| DirectorySetOwner Method (String, DirectorySecurity, Byte, Boolean) |
Sets the owner of a directory.
Namespace:
Galactic.FileSystem
Assembly:
Galactic.FileSystem (in Galactic.FileSystem.dll) Version: 1.3.0.499 (1.3.0.499)
Syntax public static bool SetOwner(
string path,
ref DirectorySecurity security,
byte[] ownerSid,
bool commitChanges
)
Public Shared Function SetOwner (
path As String,
ByRef security As DirectorySecurity,
ownerSid As Byte(),
commitChanges As Boolean
) As Boolean
public:
static bool SetOwner(
String^ path,
DirectorySecurity^% security,
array<unsigned char>^ ownerSid,
bool commitChanges
)
static member SetOwner :
path : string *
security : DirectorySecurity byref *
ownerSid : byte[] *
commitChanges : bool -> bool
Parameters
- path
- Type: SystemString
The path to the directory to have the ownership set on. - security
- Type: System.Security.AccessControlDirectorySecurity
The DirectorySecurity object of the directory that will be changed. - ownerSid
- Type: SystemByte
The security identifier (SID) of the account that should take ownership of the entry. - commitChanges
- Type: SystemBoolean
Indicates whether changes should be commited to this entry. Useful when combining multiple commands.
Return Value
Type:
BooleanTrue if the ownership could be set. False otherwise.
See Also