> Hi..
> how to detect file creating and deleting and renaming files
> immediately in java
> please give the answer .....urgently...
Hi....
i want to detect file operations in the hard disk....
please encourage us...ok
iam doing searcher.
if i have this facility...i don't need to scan the hard disk again...
i think u get me...
sorry if i talk something rudely...
but try to solve if u know....otherwise try to know solution for
quesion...
but don't comment....
Thanks!!!
sorry Sir..
bye..take care
Roedy Green - 05 Mar 2006 15:23 GMT
>i want to detect file operations in the hard disk....
>please encourage us...ok
see http://mindprod.com/jgloss/multiposting.html

Signature
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.
Alun Harford - 05 Mar 2006 16:29 GMT
> Hi....
>
[quoted text clipped - 10 lines]
> sorry Sir..
> bye..take care
JNI
Chris Uppal - 05 Mar 2006 16:41 GMT
> i want to detect file operations in the hard disk....
This is inherently OS-specific (if, indeed, it is possible it at all). So
probably the easiest thing to do is to write/find/buy a little (OS-specific)
program (written in whatever OS-specific language you like) which uses the OS
features to watch for filesystem changes. It continually writes a list of the
changed files to its stdout (don't forget to flush()!). Your Java program can
start that off, and read the ongoing stream of filenames (etc) from a
background thread.
Alternatively, you could poll the filesystem from Java. But unless you are
either looking at a very small number of files, or polling very infrequently,
then you risk putting too high a load on the machine.
-- chris
Oliver Wong - 06 Mar 2006 19:30 GMT
> Hi....
>
[quoted text clipped - 10 lines]
> sorry Sir..
> bye..take care
I'm not sure what you mean by "try to know solution for quesion... but
don't comment...", so if you didn't want me to reply to this, I apologize,
and you can ignore the rest of this message.
Probably, rather than trying to detect file operations on the hard disk,
you're more interested in detecting file operations on the file system. The
distinction is important, because a single file system might span more than
one hard disk (or it might span less than a single hard disk), and a hard
disk might contain data in a filesystem that is not understood by the OS the
JVM is currently running in.
As Chris has mentioned, your best bet to do this only in Java is to poll
the file system, looking for files. Unfortunately, this won't allow you to
detect changes "immediately". Rather, you'll detect the files when you
actually do the polling.
- Oliver
@Oliver
Hi....
i want to detect file operations in the hard disk....
please encourage us...ok
iam doing searcher.
if i have this facility...i don't need to scan the hard disk again...
i think u get me...
sorry if i talk something rudely...
but try to solve if u know....otherwise try to know solution for
quesion...
but don't comment....
Thanks!!!
sorry Sir..
bye..take care