Re: monitor a folder for file creation, how?
- From: Mike Meyer <mwm@xxxxxxxxx>
- Date: Thu, 28 Jul 2005 22:31:41 -0400
fanbanlo <henryho@xxxxxxxxxxxxxxxxxxxx> writes:
> How do I monitor a folder for new file(s) creation?
> How to use thread to do a wait until a new file is 'detected'?
There's not a clean portable way to do this.
The portable way is to poll the update time of the folder at regular
intervals, and act when it changes. I did that for a Maildir mail
monitoring tool once, but can't seem to find the source now. Sorry.
The clean way depends on your platform. Most modern system have a
mechanism to get the kernel to notify you when a file/directory is
updated. But they are all different. Since you say "folder", I assume
you're on Windows - and I can't help you with this one.
<mike
--
Mike Meyer <mwm@xxxxxxxxx> http://www.mired.org/home/mwm/
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.
.
- Follow-Ups:
- Re: monitor a folder for file creation, how?
- From: gene tani
- Re: monitor a folder for file creation, how?
- References:
- monitor a folder for file creation, how?
- From: fanbanlo
- monitor a folder for file creation, how?
- Prev by Date: Re: Adding code and methods to a class dynamically
- Next by Date: RE: [path-PEP] Path inherits from basestring again
- Previous by thread: monitor a folder for file creation, how?
- Next by thread: Re: monitor a folder for file creation, how?
- Index(es):
Relevant Pages
|