@tauri-apps/plugin-fs - v2.4.1
    Preparing search index...

    Function rename

    • Renames (moves) oldpath to newpath. Paths may be files or directories. If newpath already exists and is not a directory, rename() replaces it. OS-specific restrictions may apply when oldpath and newpath are in different directories.

      On Unix, this operation does not follow symlinks at either path.

      Parameters

      Returns Promise<void>

      import { rename, BaseDirectory } from '@tauri-apps/plugin-fs';
      await rename('avatar.png', 'deleted.png', { oldPathBaseDir: BaseDirectory.App, newPathBaseDir: BaseDirectory.AppLocalData });

      2.0.0