I am working on an application that prompts for a directory path. I use directory.exists(path) to verify that the directory exists, and if it doesn't then create it.
This works fine as long as the path that was entered is valid. However if the path that has been entered is invalid -- for instance path = c;\anydir.
false is returned when I test for directory.exists, so I use: dim di as DirectoryInfo =directory.create(path)
to create the directory. The directory is not created, but directory.exists(path) now returns true. Is there a way of determining that the directory was not created successfully?
This works fine as long as the path that was entered is valid. However if the path that has been entered is invalid -- for instance path = c;\anydir.
false is returned when I test for directory.exists, so I use: dim di as DirectoryInfo =directory.create(path)
to create the directory. The directory is not created, but directory.exists(path) now returns true. Is there a way of determining that the directory was not created successfully?