I use FileWriter for create a file. I have an error Directory does not exist I think that FileWriter create the directory if it did not exist
FileWriter writer = new FileWriter(sFileName);
java.io.FileWriter
does not create missing directories in the file path.
To create the directories you could do the following:
final File file = new File(sFileName);
final File parent_directory = file.getParentFile();
if (null != parent_directory)
{
parent_directory.mkdirs();
}
FileWriter writer = new FileWriter(file);