diff --git a/src/api/filesystem.ts b/src/api/filesystem.ts index 66eb9ee..f08f8ba 100644 --- a/src/api/filesystem.ts +++ b/src/api/filesystem.ts @@ -4,6 +4,7 @@ import type { DirectoryEntry, DirectoryReaderOptions, FileReaderOptions, + CopyOptions, OpenedFile, Stats, Watcher @@ -83,8 +84,8 @@ export function readDirectory(path: string, options?: DirectoryReaderOptions): P return sendMessage('filesystem.readDirectory', { path, ...options }); }; -export function copy(source: string, destination: string): Promise { - return sendMessage('filesystem.copy', { source, destination } ); +export function copy(source: string, destination: string, options?: CopyOptions ): Promise { + return sendMessage('filesystem.copy', { source, destination, ...options } ); }; export function move(source: string, destination: string): Promise { diff --git a/src/types/api/filesystem.ts b/src/types/api/filesystem.ts index edfb95f..f68e112 100644 --- a/src/types/api/filesystem.ts +++ b/src/types/api/filesystem.ts @@ -31,4 +31,10 @@ export interface Stats { export interface Watcher { id: number; path: string; -} \ No newline at end of file +} + +export interface CopyOptions { + recursive: boolean; + overwrite: boolean; + skip: boolean; +}