Example #1
0
 public static FileAttributes GetFileAttributes(string path)
 {
   var data = new FILE_ATTRIBUTE_DATA();
   return GetFileAttributesEx(path, 0, ref data) ? (FileAttributes)data.fileAttributes : FileAttributes.Invalid;
 }
Example #2
0
 public static extern bool GetFileAttributesEx(string name, int fileInfoLevel, ref FILE_ATTRIBUTE_DATA lpFileInformation);
Example #3
0
        public static FileAttributes GetFileAttributes(string path)
        {
            var data = new FILE_ATTRIBUTE_DATA();

            return(GetFileAttributesExW(path, 0, ref data) ? (FileAttributes)data.fileAttributes : FileAttributes.Invalid);
        }
Example #4
0
 internal static extern bool GetFileAttributesEx(string path, int level, out FILE_ATTRIBUTE_DATA data);
Example #5
0
 public static extern bool GetFileAttributesExW(string name, int fileInfoLevel, ref FILE_ATTRIBUTE_DATA lpFileInformation);