FileSystemAttributes class

This is a helper class to construct a string representing the NTFS attributes to a file or directory.

See https://docs.microsoft.com/en-us/rest/api/storageservices/create-file#file-system-attributes

Properties

archive

Specifies a directory or file is an archive. Applications typically use this attribute to mark files for backup or removal.

directory

Specifies the handle identifies a directory.

hidden

Specifies a directory or file is hidden.

none

Specifies a directory or file that does not have other attributes set. This attribute is valid only when used alone.

noScrubData

Specifies the user data stream not to be read by the background data integrity scanner. This file system attribute is presented primarily to provide compatibility with Windows. Applicable to directory or file.

notContentIndexed

Specifies the directory or file is not to be indexed by the content indexing service.

offline

Specifies the data of a directory or file is not available immediately. This file system attribute is presented primarily to provide compatibility with Windows - Azure Files does not support with offline storage options.

readonly

Specifies a directory or file that is read-only.

system

Specifies a directory or file that the operating system uses a part of, or uses exclusively.

temporary

Specifies if a file is temporary.

Methods

parse(string)

Creates a FileSystemAttributes from the specified attributes string. This method will throw an Error if it encounters a string that does not correspond to a valid attributes.

toString()

Converts the given attributes to a string.

Property Details

archive

Specifies a directory or file is an archive. Applications typically use this attribute to mark files for backup or removal.

archive: boolean

Property Value

boolean

directory

Specifies the handle identifies a directory.

directory: boolean

Property Value

boolean

hidden

Specifies a directory or file is hidden.

hidden: boolean

Property Value

boolean

none

Specifies a directory or file that does not have other attributes set. This attribute is valid only when used alone.

none: boolean

Property Value

boolean

noScrubData

Specifies the user data stream not to be read by the background data integrity scanner. This file system attribute is presented primarily to provide compatibility with Windows. Applicable to directory or file.

noScrubData: boolean

Property Value

boolean

notContentIndexed

Specifies the directory or file is not to be indexed by the content indexing service.

notContentIndexed: boolean

Property Value

boolean

offline

Specifies the data of a directory or file is not available immediately. This file system attribute is presented primarily to provide compatibility with Windows - Azure Files does not support with offline storage options.

offline: boolean

Property Value

boolean

readonly

Specifies a directory or file that is read-only.

readonly: boolean

Property Value

boolean

system

Specifies a directory or file that the operating system uses a part of, or uses exclusively.

system: boolean

Property Value

boolean

temporary

Specifies if a file is temporary.

temporary: boolean

Property Value

boolean

Method Details

parse(string)

Creates a FileSystemAttributes from the specified attributes string. This method will throw an Error if it encounters a string that does not correspond to a valid attributes.

static function parse(fileAttributes: string): FileSystemAttributes

Parameters

fileAttributes

string

The value of header x-ms-file-attributes.

Returns

toString()

Converts the given attributes to a string.

function toString(): string

Returns

string

A string which represents the FileSystemAttributes