Sets the last-modified time of the file or directory named by this abstract pathname.
All platforms support file-modification times to the nearest second,
but some provide more precision. The argument will be truncated to fit
the supported precision. If the operation succeeds and no intervening
operations on the file take place, then the next invocation of the
method will return the (possibly
truncated) lastModifiedtime argument that was passed to this method.
time | The new last-modified time, measured in milliseconds since the epoch (00:00:00 GMT, January 1, 1970) |
true if and only if the operation succeeded;
false otherwise
IllegalArgumentException | If the argument is negative | |
SecurityException
| If a security manager exists and its
method denies write access to the named file |
Diagram: File