DELETE_ON_CLOSE question

Christian Ullenboom ullenboom at googlemail.com
Thu Aug 6 05:38:14 PDT 2009


If I change the Path to Paths.get( "c:/opa.herbert.tmp" ); then its
fine. So the combination of Windows + Shared Folders + Samba seems to
be the problem. Even if I put some sleep it doesn't delete the file.

path.newOutputStream( StandardOpenOption.DELETE_ON_CLOSE,
StandardOpenOption.SYNC ).close();
TimeUnit.SECONDS.sleep( 10 );
System.out.println( path.exists() );  // still true!

So the file is still there but not if the Path is local, then its
correctly deleted.

 Christian



More information about the nio-discuss mailing list