J
Jay2 Fernando
i have been able to successfully use the inotify
(http://raa.ruby-lang.org/project/ruby-inotify/) to monitor a directory,
and monitor subdirectories when they are created.
However, when a file is created in a newly monitored subdirectory, I
cannot figure out how I can get the full path to that file. to make this
clear, say i am monitoring the directory "/tmp/monitor", the script will
detect that a subdirectory "subdir" is created and will monitor that.
however, when a file (say "test") is created under "subdir", I do not
know how to get to that file, i.e. how can i get the full path
"/tmp/monitor/subdir/test".
i hope that was clear. can anyone help?
(i erroneously posted this message earlier at RForum. sorry for the
cross-post)
(http://raa.ruby-lang.org/project/ruby-inotify/) to monitor a directory,
and monitor subdirectories when they are created.
However, when a file is created in a newly monitored subdirectory, I
cannot figure out how I can get the full path to that file. to make this
clear, say i am monitoring the directory "/tmp/monitor", the script will
detect that a subdirectory "subdir" is created and will monitor that.
however, when a file (say "test") is created under "subdir", I do not
know how to get to that file, i.e. how can i get the full path
"/tmp/monitor/subdir/test".
i hope that was clear. can anyone help?
(i erroneously posted this message earlier at RForum. sorry for the
cross-post)