C# Class Dev2.FileIO

显示文件 Open project: Warewolf-ESB/Warewolf

Public Methods

Method Description
CheckPermissions ( System.Security.Principal.WindowsIdentity user, string path, FileSystemRights expectedRights ) : bool

Checks the permissions.

CheckPermissions ( string userAndDomain, string pass, string path, FileSystemRights rights ) : bool

Checks the permissions.

Private Methods

Method Description
CloseHandle ( IntPtr handle ) : bool
ExtractDomain ( string path ) : string

Extracts the domain.

ExtractUserName ( string path ) : string

Extracts the name of the user.

LogonUser ( String lpszUsername, String lpszDomain, String lpszPassword, int dwLogonType, int dwLogonProvider, SafeTokenHandle &phToken ) : bool

Method Details

CheckPermissions() public static method

Checks the permissions.
public static CheckPermissions ( System.Security.Principal.WindowsIdentity user, string path, FileSystemRights expectedRights ) : bool
user System.Security.Principal.WindowsIdentity The user.
path string The path.
expectedRights FileSystemRights The expected rights.
return bool

CheckPermissions() public static method

Checks the permissions.
Failed to authenticate with user [ + userAndDomain + ] for resource [ + path + ]
public static CheckPermissions ( string userAndDomain, string pass, string path, FileSystemRights rights ) : bool
userAndDomain string The user and domain.
pass string The pass.
path string The path.
rights FileSystemRights The rights.
return bool