- Feature Articles
- CodeSOD
- Error'd
-
Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Edit Admin
If the IOError.Exists exception corresponds under the covers to the POSIX "EEXISTS" error value, you only know that something with that name exists. The "something" might be a directory, but it just as easily be a bound UNIX socket, a terminal character device node, a symbolic link, or even a file. Good luck dealing with that.
The Windows documentation isn't clear, but could easily be trying to say something similar.
Edit Admin
Also, I wouldn't bother with all the "crawl back up to find where it first doesn't exist" junk. Just start at the shortest length and work toward the full path.