NTFSAttributes Class

Valid set of attributes to set for file or directory. To set attribute for directory, 'Directory' should always be enabled except setting 'None' for directory.

Inheritance
builtins.object
NTFSAttributes

Constructor

NTFSAttributes(read_only=False, hidden=False, system=False, none=False, directory=False, archive=False, temporary=False, offline=False, not_content_indexed=False, no_scrub_data=False)

Variables

read_only
bool

Enable/disable 'ReadOnly' attribute for DIRECTORY or FILE

hidden
bool

Enable/disable 'Hidden' attribute for DIRECTORY or FILE

system
bool

Enable/disable 'System' attribute for DIRECTORY or FILE

none
bool

Enable/disable 'None' attribute for DIRECTORY or FILE to clear all attributes of FILE/DIRECTORY

directory
bool

Enable/disable 'Directory' attribute for DIRECTORY

archive
bool

Enable/disable 'Archive' attribute for DIRECTORY or FILE

temporary
bool

Enable/disable 'Temporary' attribute for FILE

offline
bool

Enable/disable 'Offline' attribute for DIRECTORY or FILE

not_content_indexed
bool

Enable/disable 'NotContentIndexed' attribute for DIRECTORY or FILE

no_scrub_data
bool

Enable/disable 'NoScrubData' attribute for DIRECTORY or FILE

Methods

from_string

Create a NTFSAttributes from a string.

To specify permissions you can pass in a string with the desired permissions, e.g. "ReadOnly|Hidden|System"

from_string

Create a NTFSAttributes from a string.

To specify permissions you can pass in a string with the desired permissions, e.g. "ReadOnly|Hidden|System"

from_string(string)

Parameters

string
str
Required

The string which dictates the permissions.

string
Required

Returns

A NTFSAttributes object

Return type