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

GetPrincipal() public method

Returns the NtlmPasswordAuthentication object used as credentials with this file or pipe.
Returns the NtlmPasswordAuthentication object used as credentials with this file or pipe. This can be used to retrieve the username for example: String username = f.getPrincipal().getName(); The Principal object returned will never be null however the username can be null indication anonymous credentials were used (e.g. some IPC$ services).
public GetPrincipal ( ) : Principal
return Principal
        public virtual Principal GetPrincipal()
        {
            return Auth;
        }