7861 Public method to add a file to the list of monitored files. |
7861 Public method to add a file to the list of monitored files. |
7862 |
7862 |
7863 @param filePath path of the file to be added |
7863 @param filePath path of the file to be added |
7864 @type str |
7864 @type str |
7865 """ |
7865 """ |
7866 if filePath: |
7866 if filePath and FileSystemUtilities.isPlainFileName(filePath): |
7867 self.__watcher.addPath(filePath) |
7867 self.__watcher.addPath(filePath) |
7868 |
7868 |
7869 def removeWatchedFilePath(self, filePath): |
7869 def removeWatchedFilePath(self, filePath): |
7870 """ |
7870 """ |
7871 Public method to remove a file from the list of monitored files. |
7871 Public method to remove a file from the list of monitored files. |
7872 |
7872 |
7873 @param filePath path of the file to be removed |
7873 @param filePath path of the file to be removed |
7874 @type str |
7874 @type str |
7875 """ |
7875 """ |
7876 if self.getOpenEditorCount(filePath) == 0: |
7876 if ( |
|
7877 self.getOpenEditorCount(filePath) == 0 |
|
7878 and FileSystemUtilities.isPlainFileName(filePath) |
|
7879 ): |
7877 self.__watcher.removePath(filePath) |
7880 self.__watcher.removePath(filePath) |
7878 |
7881 |
7879 ################################################################## |
7882 ################################################################## |
7880 ## Below are protected utility methods |
7883 ## Below are protected utility methods |
7881 ################################################################## |
7884 ################################################################## |