コード例 #1
0
        public static bool SetAttributes(String path, FileAttributes fileAttributes)
        {
            if (Settings.IsUnix)
            {
                try
                {
                    System.IO.File.SetAttributes(path, (System.IO.FileAttributes)fileAttributes);
                    return(true);
                }
                catch (Exception)
                {
                    return(false);
                }
            }


            String fullPath = NameFix.AddLongPathPrefix(path);

            return(Win32Native.SetFileAttributes(fullPath, (int)fileAttributes));
        }
コード例 #2
0
        public static bool SetAttributes(String path, FileAttributes fileAttributes)
        {
            String fullPath = NameFix.AddLongPathPrefix(path);

            return(Win32Native.SetFileAttributes(fullPath, (int)fileAttributes));
        }