예제 #1
0
파일: File.cs 프로젝트: bangush/LongPath
        public static void SetAccessControl(string path, FileSecurity fileSecurity)
        {
            if (Common.IsRunningOnMono() && Common.IsPlatformUnix())
            {
                SysFile.SetAccessControl(path, fileSecurity);
                return;
            }

            if (path == null)
            {
                throw new ArgumentNullException("path");
            }
            if (fileSecurity == null)
            {
                throw new ArgumentNullException("fileSecurity");
            }
            var name = Path.NormalizeLongPath(Path.GetFullPath(path));

            Common.SetAccessControlExtracted(fileSecurity, name);
        }