I have some code that effectively does this :
File file = new File("C:\\Program Files (x86)\\Something\\fred.txt"); System.out.println("file.canWrite() = " + file.canWrite());
It prints true.
Now the odd thing is, I can create the file without any exceptions. Furthermore, another program can read the file I've created. The thing is, in Windows Explorer, the file doesn't show up at all!
Show hidden files you may be thinking, but no, I've got that option turned on.
I've also found out about 'super hidden files' in Vista, so I've turned that option on and I still can't see the file! Maybe I haven't edited my registry correctly – I can only assume the file is super hidden – where else could it be?
Now the problem is that I'm creating an html file and the when I fire up a browser, it can't see the html file because it's super hidden.
How can I prevent Java creating a super hidden file? This is running under JRE 6 update 6.