Suppose the user provides a filepath to a directory which will be overwritten and recreated with new files within.
How do I check that the user didn't accidently provided a critical path, e.g. "/", or any other multitude of dangerous possibilities?
Hardcoding every possibility doesn't seem practical, even If I did know all the possible paths.
Thanks!
How do I check that the user didn't accidently provided a critical path, e.g. "/", or any other multitude of dangerous possibilities?
Hardcoding every possibility doesn't seem practical, even If I did know all the possible paths.
Code:
if (![[url path] isEqualTo:@"/"])
Thanks!