This repository was archived by the owner on Feb 2, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +9
-11
lines changed Expand file tree Collapse file tree 2 files changed +9
-11
lines changed Original file line number Diff line number Diff line change @@ -301,7 +301,13 @@ interface IFileSystem {
301
301
*/
302
302
getFsStats ( path : string ) : IFsStats ;
303
303
304
- getLsStats ( path : string ) : IFuture < IFsStats > ;
304
+ /**
305
+ * Returns information about the specified file.
306
+ * In case the passed path is symlink, the returned information is about the symlink itself.
307
+ * @param {string } path Path to file for which the information will be taken.
308
+ * @returns {IFsStats } Inforamation about the specified file.
309
+ */
310
+ getLsStats ( path : string ) : IFsStats ;
305
311
306
312
symlink ( sourcePath : string , destinationPath : string , type : "file" ) : void ;
307
313
symlink ( sourcePath : string , destinationPath : string , type : "dir" ) : void ;
Original file line number Diff line number Diff line change @@ -249,16 +249,8 @@ export class FileSystem implements IFileSystem {
249
249
return fs . statSync ( path ) ;
250
250
}
251
251
252
- public getLsStats ( path : string ) : IFuture < fs . Stats > {
253
- let future = new Future < fs . Stats > ( ) ;
254
- fs . lstat ( path , ( err : Error , data : fs . Stats ) => {
255
- if ( err ) {
256
- future . throw ( err ) ;
257
- } else {
258
- future . return ( data ) ;
259
- }
260
- } ) ;
261
- return future ;
252
+ public getLsStats ( path : string ) : fs . Stats {
253
+ return fs . lstatSync ( path ) ;
262
254
}
263
255
264
256
public getUniqueFileName ( baseName : string ) : string {
You can’t perform that action at this time.
0 commit comments