I want to control in which folder my file is.
I work with a certain folder structure:
- Main folder
- processing subfolder
- processed subfolder
To write my unit tests I want to put the test folder in the target which gives following folder structures
target\test-folder\
This is the main folder
target\test-folder\processing\
This is the subfolder processing
target\test-folder\processed
This is the subfolder processed
I want to print out in which folder a certain file is, what I wanted to do is the following:
String[] directories = PATH.split("\"");
System.out.println(directories[directories.length - 2]);
When I debug I see that my array directories only contain 1 item, with the whole path, so my split is probably wrong.
What should I put as split value?
PathorFile.