Created
March 23, 2018 05:13
-
-
Save longtth/aec062b713482c01d3486c0b56cf5a62 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class FileDirChecker | |
{ | |
public bool isDirectory(string path) | |
{ | |
bool ret = false; | |
// get the file attributes for file or directory | |
FileAttributes attr = File.GetAttributes(path); | |
if (attr.HasFlag(FileAttributes.Directory)) | |
ret = true; | |
else | |
ret = false; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment