We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e4128af commit 9735b74Copy full SHA for 9735b74
src/compiler/sys.ts
@@ -18,6 +18,8 @@ module ts {
18
readDirectory(path: string, extension?: string): string[];
19
getMemoryUsage? (): number;
20
exit(exitCode?: number): void;
21
+ getModififedTime? (fileName: string): Date;
22
+ stat? (fileName: string, callback?: (err: any, stats: any) => any): void;
23
}
24
25
export interface FileWatcher {
@@ -303,6 +305,13 @@ module ts {
303
305
},
304
306
exit(exitCode?: number): void {
307
process.exit(exitCode);
308
+ },
309
+ getModififedTime(fileName: string): Date {
310
+ var stats = _fs.statSync(fileName);
311
+ return stats.mtime;
312
313
+ stat(fileName: string, callback?: (err: any, stats: any) => any) {
314
+ _fs.stat(fileName, callback);
315
316
};
317
0 commit comments