I wish to validate a string path. I don't want to check that the path exists or create the path (that includes create + then delete), I simply wish to check that the input string COULD be a validate path on the executing system.
So far I have been messing with the File
class with no luck. I would expect the following to fail on my OSX machine but it doesn't:
File f = new File("!@£$%^&*()±§-_=+[{}]:;\"'|>.?/<,~`±");
System.out.println(f.getCanonicalPath());
Is there anything that will do this for me?