(dirName, dirPath, fallbackOptions)
| 6385 | }; |
| 6386 | } |
| 6387 | function createDirectoryWatcher(dirName, dirPath, fallbackOptions) { |
| 6388 | var watcher = fsWatch(dirName, 1 /* FileSystemEntryKind.Directory */, function (_eventName, relativeFileName) { |
| 6389 | // When files are deleted from disk, the triggered "rename" event would have a relativefileName of "undefined" |
| 6390 | if (!ts.isString(relativeFileName)) |
| 6391 | return; |
| 6392 | var fileName = ts.getNormalizedAbsolutePath(relativeFileName, dirName); |
| 6393 | // Some applications save a working file via rename operations |
| 6394 | var callbacks = fileName && fileWatcherCallbacks.get(toCanonicalName(fileName)); |
| 6395 | if (callbacks) { |
| 6396 | for (var _i = 0, callbacks_1 = callbacks; _i < callbacks_1.length; _i++) { |
| 6397 | var fileCallback = callbacks_1[_i]; |
| 6398 | fileCallback(fileName, FileWatcherEventKind.Changed); |
| 6399 | } |
| 6400 | } |
| 6401 | }, |
| 6402 | /*recursive*/ false, PollingInterval.Medium, fallbackOptions); |
| 6403 | watcher.referenceCount = 0; |
| 6404 | dirWatchers.set(dirPath, watcher); |
| 6405 | return watcher; |
| 6406 | } |
| 6407 | } |
| 6408 | function createFixedChunkSizePollingWatchFile(host) { |
| 6409 | var watchedFiles = []; |
no test coverage detected
searching dependent graphs…