Removes the named file or directory. If the directory is not empty and the recursive option isn't set to true, the promise will be rejected.
recursive
Optional
import { remove, BaseDirectory } from '@tauri-apps/plugin-fs';await remove('users/file.txt', { baseDir: BaseDirectory.AppLocalData });await remove('users', { baseDir: BaseDirectory.AppLocalData }); Copy
import { remove, BaseDirectory } from '@tauri-apps/plugin-fs';await remove('users/file.txt', { baseDir: BaseDirectory.AppLocalData });await remove('users', { baseDir: BaseDirectory.AppLocalData });
2.0.0
Removes the named file or directory. If the directory is not empty and the
recursive
option isn't set to true, the promise will be rejected.