Show / Hide Table of Contents

Struct FAttr

Contains file or directory attributes. Tells whether it exists, is directory, readonly, hidden, system, NTFS link. See filesystem.exists.

public struct FAttr

Namespace: Au.Types
Assembly: Au.dll

Properties

Name Description
Attributes

Returns file or directory attributes. Returns 0 if FAttr.Existsfalse.

Directory

Is directory, or NTFS link to a directory (if FAttr.IsNtfsLinktrue).

Exists

Exists and is accessible (FAttr.Unknownfalse). See also FAttr.File, FAttr.Directory.

File

Is file (not directory), or NTFS link to a file (if FAttr.IsNtfsLinktrue).

IsHidden

Has System.IO.FileAttributes.Hidden.

IsNtfsLink

It is a NTFS link, such as symbolic link, junction or mount point. Don't confuse with shell links (shortcuts). If FAttr.Filetrue, the target is a file. If FAttr.Directorytrue, the target is a directory.

IsReadonly

Has System.IO.FileAttributes.ReadOnly.

IsSystem

Has System.IO.FileAttributes.System.

Unknown

Exists but this process cannot access it and get attributes (error "access denied"). Then other bool properties return false.

Methods

Name Description
ToString()

Operators

Name Description
implicit operator bool(FAttr)

Returns FAttr.Exists.

implicit operator int(FAttr)

Returns 0 if !FAttr.Exists, 1 if FAttr.File, 2 if FAttr.Directory. Can be used with switch.