Mkdirs() creates read-only directories

In my application I have a piece of code that creates directories with mkdirs(). So far, so good.

But after that, I want to copy a file to one of the (sub)directories. However, the directories are all read-only, so I get a runtime error:

java.io.FileNotFoundException: (Permission denied)

Because the directory is read-only, I cannot copy files to it, right? If so, how can I solve this? I understood there's a command called setReadOnly for File objects, but setting it to false didnt work.

[518 byte] By [N00dlesa] at [2007-11-27 11:42:07]
# 1

What are you doing to get this exception? Some code might help.

sabre150a at 2007-7-29 17:42:20 > top of Java-index,Core,Core APIs...