Wittyshare
0.2
|
WittyShare uses Gamin to monitor the filesystem and this is implemented in WsMonitor class. This option can be desactivated (See monitoring key in wittyshare_global.json). There are 2 threads that monitors the filesystem. The first one monitors all files except config files. The second one monitors only config dir. When a new file is created or deleted outside the .config folder, the update thread will wait for a timeout to expire (See refresh_delay in wittyshare_global.json) and will then update the tree. If a file is created, deleted, modified in the .config directory, the update thread will wait for the timeout and will rebuild the tree to take into account new config files. A lock can be set to avoid Directory scanning during a file/folder copy. To do that you only need to create a file named freezetree in the .config folder located in the root, before the file copy and remove it after. The update thread will look for this file before updating and will cancel update if the file is existing.
If the monitoring is disabled, the filesystemTree will not be updated when a file creation/deletion occurs. However the FileSystemTree will refresh everytime a timeout occurs (See refresh_delay in wittyshare_global.json). If this refresh delay is set to 0, the FileSystemTree will never refresh.