See, the problem with doing it that way is that if the directory does not exist then things will get messed up because I am assuming that it is a file. I know I can use that and still work around it but I think there should be a better way.
I saw someone use bytes to determine if a path was a file or directory but I dont know if that is the best way either because if the file is empty then it will be 0 bytes just like the directory.
But I really dont know how they used bytes to determine that, so I may be completely wrong. I would think that a folder has some attribute that no file has and that is what should be tested for. But I dont know. Please help.