Show / Hide Table of Contents

Method filesystem.getAttributes


Overload

Gets file or directory attributes.

public static bool getAttributes(string path, out FileAttributes attributes, FAFlags flags = 0)
Parameters
path  (string)

Full path. Supports @"\.." etc. If flag UseRawPath not used, supports environment variables (see pathname.expand).

attributes  (FileAttributes)

Receives attributes, or 0 if failed.

flags  (FAFlags)
Returns
bool

false if the file/directory does not exist.

Exceptions
ArgumentException

Not full path (when not used flag UseRawPath).

AuException

Failed. Not thrown if used flag DontThrow.

Remarks

Calls API GetFileAttributes. For NTFS links, gets attributes of the link, not of its target.