Assume final String fname = "/dir1/dir2/fname.ext". I do not wish to parse the string recursively in order to create the directories if they do not exist, and only then write to a file. I wish to use the given string, fname, for creating the directories and file if each of which does not exist.
Assume final String fname = /dir1/dir2/fname.ext . I do not wish to parse the
Share
This is the code you are looking for: