On 27 Dec 2000, at 12:11, Peter Pentchev wrote:

> I would do that (and have done it in several projects) using opendir()
> and readdir().  Open the directory, read entry by entry, when you find
> a file you want, process it and unlink() it.  Get to the end of the dir,
> sleep, repeat.

Thanks for that.

Do you have code I can use as a starting position?

> DJB's Maildir concept is based on having two directories - a temporary
> one where files are created and then atomically move/rename'd to
> the real one.  This works best when the tempdir and the real dir are
> located on the same filesystem, and you can use the rename() syscall.

At present the files are created through procmail like this:

|/usr/bin/perl $HOME/process_cvs_mail.pl > ~/msgs/$FILE

I guess I could add a rename.

cheers

--
Dan Langille
The FreeBSD Diary - http://freebsddiary.org/
       FreshPorts - http://freshports.org/
     NZ Broadband - http://unixathome.org/broadband/


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to