Ejemplo n.º 1
0
        public void SetAccessControl(FileSecurity fileSecurity)
        {
            if (null == fileSecurity)
            {
                throw new ArgumentNullException("fileSecurity");
            }

            fileSecurity.PersistModifications(SafeFileHandle);
        }
Ejemplo n.º 2
0
        public static void SetAccessControl(string path,
                                            FileSecurity fileSecurity)
        {
            if (null == fileSecurity)
            {
                throw new ArgumentNullException("fileSecurity");
            }

            fileSecurity.PersistModifications(path);
        }
Ejemplo n.º 3
0
        public void SetAccessControl(FileSecurity fileSecurity)
        {
            if (safeHandle.IsClosed)
            {
                throw new ObjectDisposedException("Stream has been closed");
            }

            if (null == fileSecurity)
            {
                throw new ArgumentNullException("fileSecurity");
            }

            fileSecurity.PersistModifications(SafeFileHandle);
        }