Retrieving attributes from Library.File()
In reviewing the documentation found here, it states that there is an Attributes property. Since this is an array, I was wondering how I would go about traversing through the array to review what attributes are available on the file.
When working with files, it's much better to use %Stream classes rather than an instance of %Library.File. If you're looking to get the attributes of a file/directory, the Attributes method in %Library.File is probably your best option. According to the class reference (which has all the details), it returns a combination of bits, the meaning of which varies depending on the operating system. This is kind of ugly, but here's an example on Windows:
According to the class reference, this is a directory (16) that is hidden (2) and not indexed (8192).
%Library.File also has some OS-independent classmethods that may be easier to use for simpler things like seeing if a file is read-only.