SharpCifs.Smb.SmbFile.GetSecurity C# (CSharp) Method

GetSecurity() public method

Return an array of Access Control Entry (ACE) objects representing the security descriptor associated with this file or directory.
Return an array of Access Control Entry (ACE) objects representing the security descriptor associated with this file or directory.

Initially, the SIDs within each ACE will not be resolved however when getType(), getDomainName(), getAccountName(), or toString() is called, the names will attempt to be resolved. If the names cannot be resolved (e.g. due to temporary network failure), the said methods will return default values (usually S-X-Y-Z strings of fragments of).

Alternatively getSecurity(true) may be used to resolve all SIDs together and detect network failures.

public GetSecurity ( ) : Ace[]
return Ace[]
        public virtual Ace[] GetSecurity()
        {
            return GetSecurity(false);
        }
    }

Same methods

SmbFile::GetSecurity ( bool resolveSids ) : Ace[]