1+ import * as fs from 'fs-extra' ;
12import * as path from 'path' ;
23
34import escapeRegExp = require( 'lodash.escaperegexp' ) ;
45import * as vscode from 'vscode' ;
56
67import * as filepaths from './managers/filepaths' ;
7- import * as fsUtils from './utils/fs' ;
88import * as promptUtils from './utils/prompt' ;
99
1010import { IPluginSettings } from './types' ;
@@ -24,7 +24,7 @@ async function openFile(filepath: string): Promise<vscode.TextEditor> {
2424async function duplicator ( uri : vscode . Uri , settings : IPluginSettings ) : Promise < vscode . TextEditor | undefined > {
2525 const oldPath = uri . fsPath ;
2626 const oldPathParsed = path . parse ( oldPath ) ;
27- const oldPathStats = await fsUtils . pathStat ( oldPath ) ;
27+ const oldPathStats = await fs . stat ( oldPath ) ;
2828
2929 // Get a new name for the resource
3030 const newName = await promptUtils . name ( oldPathParsed . name ) ;
@@ -43,7 +43,7 @@ async function duplicator(uri: vscode.Uri, settings: IPluginSettings): Promise<v
4343 }
4444
4545 // Check if the current path exists
46- const newPathExists = await fsUtils . pathExists ( newPath ) ;
46+ const newPathExists = await fs . pathExists ( newPath ) ;
4747 if ( newPathExists ) {
4848 const userAnswer = await promptUtils . overwrite ( newPath ) ;
4949 if ( ! userAnswer ) {
@@ -52,7 +52,7 @@ async function duplicator(uri: vscode.Uri, settings: IPluginSettings): Promise<v
5252 }
5353
5454 try {
55- await fsUtils . copy ( uri . fsPath , newPath ) ;
55+ await fs . copy ( uri . fsPath , newPath ) ;
5656
5757 if ( settings . openFileAfterCopy && oldPathStats . isFile ( ) ) {
5858 return openFile ( newPath ) ;
0 commit comments