문제

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