@@ -914,6 +914,11 @@ export interface RuntimeDirEntry {
914914 isSymlink : boolean ;
915915}
916916
917+ export interface RuntimeFileInfo {
918+ isFile ( ) : boolean ;
919+ isDirectory ( ) : boolean ;
920+ }
921+
917922export interface RuntimeFileSystem {
918923 /** Gets if this file system is case sensitive. */
919924 isCaseSensitive ( ) : boolean ;
@@ -943,14 +948,10 @@ export interface RuntimeFileSystem {
943948 copy ( srcPath : string , destPath : string ) : Promise < void > ;
944949 /** Synchronously copies a file or directory. */
945950 copySync ( srcPath : string , destPath : string ) : void ;
946- /** Asynchronously checks if a file exists. */
947- fileExists ( filePath : string ) : Promise < boolean > ;
948- /** Synchronously checks if a file exists. */
949- fileExistsSync ( filePath : string ) : boolean ;
950- /** Asynchronously checks if a directory exists. */
951- directoryExists ( dirPath : string ) : Promise < boolean > ;
952- /** Synchronously checks if a directory exists. */
953- directoryExistsSync ( dirPath : string ) : boolean ;
951+ /** Asynchronously gets the path's stat information. */
952+ stat ( path : string ) : Promise < RuntimeFileInfo > ;
953+ /** Synchronously gets the path's stat information. */
954+ statSync ( path : string ) : RuntimeFileInfo ;
954955 /** See https://nodejs.org/api/fs.html#fs_fs_realpathsync_path_options */
955956 realpathSync ( path : string ) : string ;
956957 /** Gets the current directory of the environment. */
0 commit comments