* Invoke the callback with rename and update the watcher if not closed * @param createWatcher
(createWatcher)
| 7253 | * @param createWatcher |
| 7254 | */ |
| 7255 | function invokeCallbackAndUpdateWatcher(createWatcher) { |
| 7256 | sysLog("sysLog:: ".concat(fileOrDirectory, ":: Changing watcher to ").concat(createWatcher === watchPresentFileSystemEntry ? "Present" : "Missing", "FileSystemEntryWatcher")); |
| 7257 | // Call the callback for current directory |
| 7258 | callback("rename", ""); |
| 7259 | // If watcher is not closed, update it |
| 7260 | if (watcher) { |
| 7261 | watcher.close(); |
| 7262 | watcher = createWatcher(); |
| 7263 | } |
| 7264 | } |
| 7265 | /** |
| 7266 | * Watch the file or directory that is currently present |
| 7267 | * and when the watched file or directory is deleted, switch to missing file system entry watcher |
no test coverage detected
searching dependent graphs…