You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Steven Keens <ke...@pcigeomatics.com> on 2006/11/22 15:34:21 UTC
[vfs] DefaultFileMonitor doesn't signal when a file is created.
I put a monitor on a configuration file (not a folder). During testing
I noticed that the monitoring doesn't recognize when the file is
created. I get changed and deleted events but never a created event.
After a bit of research I realized that I have to monitor the folder in
which the file resides. I feel it is inconsistent and requires the
developer to read the documentation more closely. Also, it requires
extra work for the developer. Before I say it is a bug I'd like to know
the reasoning for this design and implementation.
Steven
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org
Re: [vfs] DefaultFileMonitor doesn't signal when a file is created.
Posted by Torsten Curdt <tc...@apache.org>.
On 11/22/06, Mario Ivankovits <ma...@ops.co.at> wrote:
> Hi Steven!
> > I put a monitor on a configuration file (not a folder). During testing
> > I noticed that the monitoring doesn't recognize when the file is
> > created. I get changed and deleted events but never a created event.
> >
> As far as I remember this is the same with all those native file system
> monitors out there, you always have to monitor the directory to get the
> create event.
> I don't know if I would like to change it, even if it is a valid use
> case, at least, it requires some in-depth thoughts ....
>
> @Thorsten: how will your fam behave in such a situation?
Need to double-check but I am pretty sure the jci fam will send send
events for that. Sure it's a special case but the jci fam is
monitoring a java.io.File object. By definition a File object can be a
file or a directory ...and it does not necessarily have to exist. So I
agree with Steven here and this getting events is expected behavior in
my book.
cheers
--
Torsten
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org
Re: [vfs] DefaultFileMonitor doesn't signal when a file is created.
Posted by Mario Ivankovits <ma...@ops.co.at>.
Hi Steven!
> I put a monitor on a configuration file (not a folder). During testing
> I noticed that the monitoring doesn't recognize when the file is
> created. I get changed and deleted events but never a created event.
>
As far as I remember this is the same with all those native file system
monitors out there, you always have to monitor the directory to get the
create event.
I don't know if I would like to change it, even if it is a valid use
case, at least, it requires some in-depth thoughts ....
@Thorsten: how will your fam behave in such a situation?
Ciao,
Mario
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org