Closed matschu closed 6 months ago
Hi! Yes, it's intentional basically because watching a remote directory tree is extremely slow. I know it can work in some cases, but it's dangerous. The generic file watcher will scan every single directory watched for changes, this is computationally expensive, and for networks this is usually too slow, since you depend on the network latency. This file watcher was developed basically as a reference for the file watchers but it's not intended to be used in production scenarios. But feel free to make any adjustments for your needs, that's why it's open source :)
Thank you for the clarification – I did indeed not think about the runtime cost being the reason for this check.
The generic file watcher detects but doesn't report new directories inside of a watched directory if that directory is on a network drive. Deleted or modified directories are reported as expected.
Assuming a directory structure like
on a remote filesystem, the folder
new_dir
is not reported after its creation. The debugger shows that the new directory is in fact detected butDirWatcherGeneric::createDirectory
explicitly discards the directory because it is on a remote file system.I'm not sure if this is a bug or intentional but after removing
FileSystem::isRemoteFS( dir )
everything seems to work as expected.