public boolean deleteOnExit ( Path f ) throws IOException { if ( ! exists ( f ) ) { return false ; } synchronized ( deleteOnExit ) { deleteOnExit . add ( f ) ; } return true ; }
Mark a path to be deleted when FileSystem is closed . When the JVM shuts down all FileSystem objects will be closed automatically . Then the marked path will be deleted as a result of closing the FileSystem .