Вопрос

I have a php script witch monitors a webdav directory for new / changed files. but when there is any action in the directory inotify only returns a temp name (.davfs.tmp251671). not the actual file name.

is there any change i can get the real file name from inotify and webdav?

Это было полезно?

Решение

found A solution.
i was using IN_CREATE (and for testing IN_CLOSE) as triggers
but that gave me the above result. a temp name..
so i used IN_ALL_EVENTS for testing.
and found that mask 128 gave the realname of the file.
but...
according to http://www.php.net/manual/en/inotify.constants.php
IN_MOVED_FROM = 64
but when testing IN_CREATE gave 256
so the order in wich the are displayed on the php manual site is incorrect.
i now use the numeric value 128 for add_watch. and it works!

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top