Show / Hide Table of Contents

Method filesystem.getProperties


Overload

Gets file or directory attributes, size and times. Calls API GetFileAttributesEx.

public static bool getProperties(string path, out FileProperties properties, FAFlags flags = 0)
Parameters
path  (string)

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

properties  (FileProperties)

Receives properties.

flags  (FAFlags)
Returns
bool

false if the file/directory does not exist.

Exceptions
ArgumentException

Not full path (when not used flag UseRawPath).

AuException

The file/directory exist but failed to get its properties. Not thrown if used flag DontThrow.

Remarks

For NTFS links, gets properties of the link, not of its target. You can also get most of these properties with filesystem.enumerate.