Sheetal Nandi f5ad78720f
Always recreate the file watcher when rename event occurs (#48997)
* Convert some of the watchEnvironment tests to baselines for updating later

* Add tests for inode watching by making fsWatch part of system function that tests presence before creating fs watch

* Refactor for simpler tests

* Accept map of file content or file or symlink or folder

* Add test when rename event occurs when file has already reappeared

* On rename event for the file, replace file watcher irrespective of file presence

* Fix regex

* Ensure that when doing inode watching watchers is replaces only on disappearance or appearance

* Some logging for debugging further

* Revert "Some logging for debugging further"

This reverts commit dd2164ac83666725c4cc58e0223425b10530d682.

* Add test when rename event occurs on mac with ~ appended to file name

* If the relativeFileName ends with tilde, remove it from the event

* Some logging for debugging further

* Revert "Some logging for debugging further"

This reverts commit e1ba8a8d5f2f30cc039a89a1e8e4e6c64ba7c44d.

* Add documentation and fail safe the event firing
2022-06-08 17:54:57 -07:00
..