|
|
|
@ -86,7 +86,7 @@ const clientProfile: Profile = { |
|
|
|
|
name: 'fs', |
|
|
|
|
displayName: 'fs', |
|
|
|
|
description: 'fs', |
|
|
|
|
methods: ['readdir', 'readFile', 'writeFile', 'mkdir', 'rmdir', 'unlink', 'rename', 'stat', 'lstat', 'exists', 'currentPath', 'watch', 'closeWatch', 'setWorkingDir', 'openFolder', 'openFolderInSameWindow', 'getRecentFolders', 'removeRecentFolder', 'openWindow', 'selectFolder', 'revealInExplorer', 'openInVSCode'] |
|
|
|
|
methods: ['readdir', 'readFile', 'writeFile', 'mkdir', 'rmdir', 'unlink', 'rename', 'stat', 'lstat', 'exists', 'currentPath', 'watch', 'closeWatch', 'setWorkingDir', 'openFolder', 'openFolderInSameWindow', 'getRecentFolders', 'removeRecentFolder', 'openWindow', 'selectFolder', 'revealInExplorer', 'openInVSCode', 'openInVSCode'] |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
class FSPluginClient extends ElectronBasePluginClient { |
|
|
|
@ -333,6 +333,10 @@ class FSPluginClient extends ElectronBasePluginClient { |
|
|
|
|
shell.showItemInFolder(this.fixPath(action.path[0])) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
async openInVSCode(action: customAction): Promise<void> { |
|
|
|
|
shell.openExternal(`vscode://file/${this.fixPath(action.path[0])}`) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
fixPath(path: string): string { |
|
|
|
|
if (this.workingDir === '') throw new Error('workingDir is not set') |
|
|
|
|
if (path) { |
|
|
|
|