copyFile
Module @netwiv/api/plugins/fs · Kind Function
import { copyFile } from '@netwiv/api/plugins/fs';Copies the contents and permissions of one file to another specified path, by default creating a new file if needed, else overwriting.
Signature
Section titled “Signature”function copyFile(fromPath: string | URL, toPath: string | URL, options?: CopyFileOptions | undefined): Promise<void>Example
Section titled “Example”import { copyFile, BaseDirectory } from '@netwiv/api/plugins/fs';await copyFile('app.conf', 'app.conf.bk', { fromPathBaseDir: BaseDirectory.AppConfig, toPathBaseDir: BaseDirectory.AppConfig });Upstream since 2.0.0
Descriptions come from the pinned @tauri-apps/plugin-fs@2.5.2 declarations (MIT OR Apache-2.0); imports are shown with @netwiv/api paths.