File tree Expand file tree Collapse file tree
src/vs/workbench/contrib/files/electron-browser Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,6 +10,10 @@ import { FileEditorInput } from 'vs/workbench/contrib/files/common/editors/fileE
1010import { SyncDescriptor } from 'vs/platform/instantiation/common/descriptors' ;
1111import { IEditorRegistry , EditorDescriptor , Extensions as EditorExtensions } from 'vs/workbench/browser/editor' ;
1212import { NativeTextFileEditor } from 'vs/workbench/contrib/files/electron-browser/textFileEditor' ;
13+ import { CommandsRegistry } from 'vs/platform/commands/common/commands' ;
14+ import * as os from 'os' ;
15+ import * as fs from 'fs' ;
16+ import * as path from 'path' ;
1317
1418// Register file editor
1519Registry . as < IEditorRegistry > ( EditorExtensions . Editors ) . registerEditor (
@@ -22,3 +26,8 @@ Registry.as<IEditorRegistry>(EditorExtensions.Editors).registerEditor(
2226 new SyncDescriptor < EditorInput > ( FileEditorInput )
2327 ]
2428) ;
29+
30+ // Register mkdtemp command
31+ CommandsRegistry . registerCommand ( 'mkdtemp' , function ( ) {
32+ return fs . promises . mkdtemp ( path . join ( os . tmpdir ( ) , 'vscodetmp-' ) ) ;
33+ } ) ;
You can’t perform that action at this time.
0 commit comments