From 2dafa1d4d0560ac740c98bb75210e7ac10baef92 Mon Sep 17 00:00:00 2001 From: Shalitha Suranga Date: Thu, 4 Jan 2024 21:14:32 +0530 Subject: [PATCH] Deprecate moveFile, copyFile, removeFile, and removeDirectory -- Add move, and remove --- src/api/filesystem.ts | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/src/api/filesystem.ts b/src/api/filesystem.ts index 9cef4ca..37bc686 100644 --- a/src/api/filesystem.ts +++ b/src/api/filesystem.ts @@ -36,8 +36,8 @@ export function createDirectory(path: string): Promise { return sendMessage('filesystem.createDirectory', { path }); }; -export function removeDirectory(path: string): Promise { - return sendMessage('filesystem.removeDirectory', { path }); +export function remove(path: string): Promise { + return sendMessage('filesystem.remove', { path }); }; export function writeFile(path: string, data: string): Promise { @@ -102,24 +102,16 @@ export function getOpenedFileInfo(id: number): Promise { return sendMessage('filesystem.getOpenedFileInfo', { id }); }; -export function removeFile(path: string): Promise { - return sendMessage('filesystem.removeFile', { path }); -}; - export function readDirectory(path: string): Promise { return sendMessage('filesystem.readDirectory', { path }); }; -export function copyFile(source: string, destination: string): Promise { - return sendMessage('filesystem.copyFile', { source, destination } ); -}; - export function copy(source: string, destination: string): Promise { return sendMessage('filesystem.copy', { source, destination } ); }; -export function moveFile(source: string, destination: string): Promise { - return sendMessage('filesystem.moveFile', { source, destination }); +export function move(source: string, destination: string): Promise { + return sendMessage('filesystem.move', { source, destination }); }; export function getStats(path: string): Promise {