S
Steve Rainbird
Why on my Windows Vista box does file.lastmodified() always return zero but
on my Linux box it returns the correct value?
on my Linux box it returns the correct value?
Why on my Windows Vista box does file.lastmodified()
.. always return zero but
on my Linux box it returns the correct value?
Andrew Thompson said:Why on my Windows Vista box does file.lastmodified()
Did you mean the File.lastModified() method?
I have not heard of the other one and cannot
comment on it.
.. always return zero but
on my Linux box it returns the correct value?
What does this print on the Vista box?
<sscce>
public class LastModified {
public static void main(String[] args) {
java.io.File file = new
java.io.File("LastModified.java");
System.out.println( file.lastModified() );
}
}
<sscce>
BTW - did you read the JavaDocs for that method?
There are two reasons listed, as to why the method
may return '0'.
"Steve Rainbird said:Why on my Windows Vista box does file.lastmodified() always return zero but
on my Linux box it returns the correct value?
Steve Rainbird said:Andrew Thompson said:Why on my Windows Vista box does file.lastmodified()
Did you mean the File.lastModified() method?
I have not heard of the other one and cannot
comment on it.
.. always return zero but
on my Linux box it returns the correct value?
What does this print on the Vista box?
<sscce>
public class LastModified {
public static void main(String[] args) {
java.io.File file = new
java.io.File("LastModified.java");
System.out.println( file.lastModified() );
}
}
<sscce>
BTW - did you read the JavaDocs for that method?
There are two reasons listed, as to why the method
may return '0'.
Andrew,
Thanks ,that displays the correct result. I think it must be a
permissions problem. I will look into it further.
Why on my Windows Vista box does file.lastmodified() always return zero but
on my Linux box it returns the correct value?
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.