A
Andy Gilman
I want a method basically that tells me if a path is a file or directory, or
any other possibilities.
What do i need to do? I'm hoping I dont have to manually determine all these
things with Exists()
for FileInfo and DirectoryInfo. If I do have to do that, is a directory also
a file?
Seems like something there may be built in support for but I cant find it
-simon
public PathType GetPathType (string path) {
....
determine if path is directory or file
....
}
enum PathType {
Directory,
File,
VirtualDirectory,
InvalidPath,
FileSystemUnavailable,
NonExistent
}
any other possibilities.
What do i need to do? I'm hoping I dont have to manually determine all these
things with Exists()
for FileInfo and DirectoryInfo. If I do have to do that, is a directory also
a file?
Seems like something there may be built in support for but I cant find it
-simon
public PathType GetPathType (string path) {
....
determine if path is directory or file
....
}
enum PathType {
Directory,
File,
VirtualDirectory,
InvalidPath,
FileSystemUnavailable,
NonExistent
}