I am working on an application installer. The user has to provide a file / directory path that will later be created by the application. I need to check if that path is valid (could exists). The problem is that I can not call file.exists() because it might not exist.
I know I could try to create it and then delete it. If it fails, the path is not valid. But is there a better, simpler way? Also, my work around requires special permissions for my installer which is not very good.