[ 
https://issues.apache.org/jira/browse/VFS-238?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andy Brook updated VFS-238:
---------------------------

    Issue Type: Improvement  (was: Bug)

Hi Ralph, thanks for the comments. 

My use case was monitoring an 'inbox' file et /var/mail/vhosts/myacct/inbox.  
This file gets wiped every time the content is read by a POP client, I was 
trying to use VFS to handle this to notice when new mail arrived.  I've worked 
around my problems and am successfully using VFS (by relying on 'changed' 
events' and checking filesize exceeds a given 'empty' size), so its all shiny 
for me.

on 1) It would be useful to be able to configure the VFS to enable persistent 
watching of a given file, that would not remove the file from the watch list if 
it got deleted, but as I said, the workaround above worked for me.  I'll 
convert this to a feature request.

> DefaultFileMonitor fails to notice file creations, or re-creations
> ------------------------------------------------------------------
>
>                 Key: VFS-238
>                 URL: https://issues.apache.org/jira/browse/VFS-238
>             Project: Commons VFS
>          Issue Type: Improvement
>    Affects Versions: 1.0
>         Environment: linux, amd64 (ubuntu 8.10)
>            Reporter: Andy Brook
>
> As title, 
> {code}
>               FileSystemManager fsManager = VFS.getManager();
>               FileObject listendir = fsManager.resolveFile("/tmp/test.txt");
>               
>               fFileMonitor = new DefaultFileMonitor(new 
> MailboxFileListener(this)); 
>               fFileMonitor.setRecursive(true); 
>               fFileMonitor.addFile(listendir);
>               fFileMonitor.start(); 
> {code}
> h3. Uncreated initial state
> # If the file does not exist before the above is run, no 'create' even is 
> fired when it is subsequently created.
> h3. Recreation use-case
> # If 'test.txt' exists, notifications of updates are generated as expected.  
> # If I now remove the file, I get a delete notification - as expected
> # If I now re-create the file, I get no notifications, even if updating.
> So this kind of breaks for me, the same behaviour was in the maven 2005.. 
> jars.
> Am I misunderstanding what the DefaultFileMonitor is supposed to do?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to