示例#1
0
        public static bool Exists(string filename)
        {
            UInt32 attribs = PathInternal.GetFileAttributes(filename);

            return(attribs != PathInternal.DllImport.INVALID_FILE_ATTRIBUTES && (attribs & PathInternal.DllImport.FILE_ATTRIBUTE_DIRECTORY) > 0);
        }
示例#2
0
 public static bool SetFileAttributes(string filename, UInt32 attribs)
 {
     return(PathInternal.DllImport.SetFileAttributesW(PathInternal.ConvertToUnicodePath(filename), attribs));
 }
示例#3
0
 public static bool Move(string source, string dest)
 {
     return(PathInternal.DllImport.MoveFileW(PathInternal.ConvertToUnicodePath(source), PathInternal.ConvertToUnicodePath(dest)));
 }
示例#4
0
 public static UInt32 GetFileAttributes(string filename)
 {
     return(PathInternal.DllImport.GetFileAttributesW(PathInternal.ConvertToUnicodePath(filename)));
 }