Running gradle under windows, I cannot delete NUL files created from other tools. For example, running this twice won’t work:
task createNUL << {
"mkdir tmp".execute()
"touch tmp/NUL".execute()
}
task deleteNUL( type: Delete ) {
dependsOn createNUL
delete 'tmp'
}
My assumption is, that this could be a Java issue, since NUL is a reserved filename: http://support.microsoft.com/kb/74496
This doesn’t work too:
import java.io.File;
public class Example {
public static void main( String[] args ) {
try{
File f = new File( "NUL" );
f.delete();
} catch( Exception e ) {
e.printStackTrace();
}
}
}
Any tips?