WindowsPath
Path using Windows path syntax.
Constructor
WindowsPath path
Parameters:
| Name | Type | Description |
|---|---|---|
path |
Str|Path |
Path value |
Returns: WindowsPath.
Converting a Unix path is allowed only when it is relative.
See Path for fields, methods, and operators.
Fields
disk
Drive letter for C:-style and \\?\C:-style prefixes, or nil otherwise.
server
UNC server name, or nil if the path does not use a UNC prefix.
share
UNC share name, or nil if the path does not use a UNC prefix.
device
Device namespace name for \\.\name paths, or nil otherwise.
is_verbatim
Returns whether the path uses a verbatim \\?\... prefix.
stream_name
Alternate data stream name, or nil if no stream is specified.
stream_type
Alternate data stream type without the leading $, or nil if no alternate
data stream was specified, or an alternate data stream was specified without an
explicit type.
Methods
sec_desc :resolve? = :TARGET: ...
Gets selected parts of the Windows security descriptor.
Optional Parameters:
| Name | Type | Description |
|---|---|---|
owner: |
Bool |
Load the owner SID |
group: |
Bool |
Load the primary group SID |
dacl: |
Bool |
Load the discretionary ACL |
sacl: |
Bool |
Load the system ACL |
resolve: |
:TARGET:|:LINK: |
Resolution mode (see fs) |
Returns: security.windows.SecDesc
SACL access requires SeSecurityPrivilege.
set_sec_desc desc :resolve = :TARGET:
Applies the components selected by a SecDesc's mask.
Parameters:
| Name | Type | Description |
|---|---|---|
desc |
security.windows.SecDesc |
Security descriptor to apply |
resolve |
:TARGET:|:LINK: |
Resolution mode (see fs) |
Windows may normalize the descriptor when associating it with the filesystem object.
streams :resolve = :TARGET:
Lists alternate data streams for this path.
Parameters
| Name | Type | Description |
|---|---|---|
resolve |
:TARGET:|:LINK: |
Resolution mode (see fs) |
Returns
iterator of StreamEntry