Jesper Young wrote:Why are you mixing single slashes and double slashes in the directory name?
Windows works with a backslash \ as the path separator, not with a forward slash /. Because \ is an escape character in Java string literals, you have to use \\ in a Java string literal for a backslash. Try this:
I tried giving backslash the way you told me.I still did not work.You can try this small piece of code yourself on your system.
Devaka Cooray wrote:
Paul Clapham wrote:I think, if you do the experiment, you'll find that "canWrite()" returns false for every single directory in your file system. Try it and tell me if I'm wrong.
Mmm, that's not.
It returns true even for directories.
Okay. And when you did the experiment, did you notice anything the the directories with canWrite=false had in common?
But that's kind of long, and if the path starts with "C:", which is a Windows-only thing, it doesn't really make sense...