Re: About File::Monitor
- From: reader@xxxxxxxxxxx
- Date: Fri, 25 Jan 2008 11:20:04 -0600
"Jay Savage" <daggerquill@xxxxxxxxx> writes:
Finally, Tom's points are important. How do you *know* that the files
(in this case a single directory) changed *during the sleep*? Do you
know that the output wasn't buffered? That the system didn't delay the
writes for some reason? That you were even watching the files you
thought you were?
Your best bet to make sure the module is working would, instead of
sleeping between scans and trying to modify the watched files from an
external process during a narrow window, would probably be to perform
your initial scan; open one of the watched files for writing; write to
it; flush the buffer; close it; and then rescan.
Sounds like a plan for testing but the end result sought in this case
is a monitor that *will* see changes done by external processes in some
reasonable time frame.
(Assuming for a moment I do get it figured out with the help in this
thread how to use File::Monitor)
How long of a sleep would be required to *KNOW* a change has happened
with something external writing to files? Is there no way to guess
that closely... too many variables may come into play? Or could one
create a monitor that will *know* inside of ten seconds that a file
has been written to?
Would *knowing* about file creation have the same problems? Or is that
something the monitor would *know* for sure quickly?
.
- Follow-Ups:
- Re: About File::Monitor
- From: Jay Savage
- Re: About File::Monitor
- From: Tom Phoenix
- Re: About File::Monitor
- References:
- About File::Monitor
- From: reader
- Re: About File::Monitor
- From: Jay Savage
- About File::Monitor
- Prev by Date: Re: Can't Install Perl as Non-Root
- Next by Date: Re: 答复: is there a way to read content from lnk on windows?
- Previous by thread: Re: About File::Monitor
- Next by thread: Re: About File::Monitor
- Index(es):
Relevant Pages
|