|
deleteOnExit
public void deleteOnExit () Requests the deletion of the file or directory represented by this abstract path name when the virtual machine terminates. Only when the virtual machine terminates normally will the delete operation be attempted, as defined in the Java Language Specification.
Once a delete operation has been requested, the request cannot be canceled. So use this method with caution.
Note: This method should not be used for file locking as the resulting protocol may not work reliably. FileLock facilities should be used instead.
Throws:
SecurityException-if a security manager exists and its SecurityManager.checkDelete (java.lang.String) method denies delete access to the file
Since:
1.2
See also:
delete () |
|