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)); }
public static bool SetAttributes(String path, FileAttributes fileAttributes) { String fullPath = NameFix.AddLongPathPrefix(path); return(Win32Native.SetFileAttributes(fullPath, (int)fileAttributes)); }