O
Oliver Wong
NickName said:long ftime = fd.lastModified();
// test output of the file day value
System.out.println(ftime);
// result: 0
// comment: bad
// question: what's wrong?
This is much better. See the javadocs
http://java.sun.com/javase/6/docs/api/java/io/File.html
<quote>
Returns:
A long value representing the time the file was last modified, measured
in milliseconds since the epoch (00:00:00 GMT, January 1, 1970), or 0L if
the file does not exist or if an I/O error occurs
</quote>
So either the file does not exist, or an I/O error occurred. Did you try
checking the output of fd.exists() ?
- Oliver