t = FileAttributes(id)
On return, the table will have the following fields initialized:
Path:
Size:
Flags:
Time:
LastAccessTime:
CreationTime:
Comment:
Streaming:True if the file is being streamed from a remote
source instead of being read from a physical drive.
NoSeek:True if this file cannot be seeked. This could
happen if the file is being streamed from a remote source that only allows
sequential reads without any seeking capabilities.
Name:Path field. The
only case where this field is really useful is when working with Storage Access
Framework (SAF) or MediaStore URIs on Android. Those URIs are often in a custom
format which might not contain the file name at all. In that case you can use
this field to find out the actual name of the file. See Working with Android URIs for details.
(V11.0)
MIMEType:If you want to query the attributes of a file that is not currently open, use GetFileAttributes() instead. See GetFileAttributes for details.
OpenFile(1, "test.txt")
t = FileAttributes(1)
Print(t.time)
If t.flags & #FILEATTR_READ_USR
Print("#FILEATTR_READ_USR is set.")
Else
Print("#FILEATTR_READ_USR is not set.")
EndIf
The code above examines the file "test.txt" and prints the time it was
last modified to the screen. Additionally, it checks if the protection
flag #FILEATTR_READ_USR is set.