View previous topic :: View next topic |
Author |
Message |
brucebowler Guest
|
Posted: Mon May 15, 2006 1:23 pm Post subject: A question on the ATTR argument to FILES@ |
|
|
When I use the FILES@ subroutine, one of the returned arguments is ATTR, which is the DOS attributes of the correspondig files. Unfortunately, I can't find anywhere *what* the various bits mean. I can deduce some of them by knowing what the files are, but it would be nice to "know for sure". Note that what I'm getting back doesn't agree at all with the values documented for calls to DIRENT@.
Any help?
Thanks!
Bruce |
|
Back to top |
|
|
Andrew
Joined: 09 Sep 2004 Posts: 232 Location: Frankfurt, Germany
|
Posted: Mon May 15, 2006 2:10 pm Post subject: A question on the ATTR argument to FILES@ |
|
|
The information returned within the ATTR argument is equivalent to the dwFileAttributes element of the WIN32_FIND_DATA structure as described here:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/fs/win32_find_data_str.asp
dwFileAttributes is comprised from the following flags, as detailed in winnt.h:
FILE_ATTRIBUTE_READONLY 0x00000001
FILE_ATTRIBUTE_HIDDEN 0x00000002
FILE_ATTRIBUTE_SYSTEM 0x00000004
FILE_ATTRIBUTE_DIRECTORY 0x00000010
FILE_ATTRIBUTE_ARCHIVE 0x00000020
FILE_ATTRIBUTE_DEVICE 0x00000040
FILE_ATTRIBUTE_NORMAL 0x00000080
FILE_ATTRIBUTE_TEMPORARY 0x00000100
FILE_ATTRIBUTE_SPARSE_FILE 0x00000200
FILE_ATTRIBUTE_REPARSE_POINT 0x00000400
FILE_ATTRIBUTE_COMPRESSED 0x00000800
FILE_ATTRIBUTE_OFFLINE 0x00001000
FILE_ATTRIBUTE_NOT_CONTENT_INDEXED 0x00002000
FILE_ATTRIBUTE_ENCRYPTED 0x00004000
Hope this helps. |
|
Back to top |
|
|
brucebowler Guest
|
Posted: Mon May 15, 2006 2:13 pm Post subject: A question on the ATTR argument to FILES@ |
|
|
Ooops... You seem to have left out the pointer to "here"... |
|
Back to top |
|
|
Andrew
Joined: 09 Sep 2004 Posts: 232 Location: Frankfurt, Germany
|
Posted: Mon May 15, 2006 2:14 pm Post subject: A question on the ATTR argument to FILES@ |
|
|
Fixed... sorry, a little eager to submit then |
|
Back to top |
|
|
brucebowler Guest
|
Posted: Mon May 15, 2006 2:25 pm Post subject: A question on the ATTR argument to FILES@ |
|
|
Well it looks like I have another question then... Is there a way, other than "hard coding them" to distinguish "." and ".." from other directories? My first guess is no, but I'd love to be proven wrong.
|
|
Back to top |
|
|
Andrew
Joined: 09 Sep 2004 Posts: 232 Location: Frankfurt, Germany
|
Posted: Mon May 15, 2006 2:27 pm Post subject: A question on the ATTR argument to FILES@ |
|
|
Your guess is correct. They appear to all the routines that access them as ordinary directories, so you will have to hard code to look for them, |
|
Back to top |
|
|
|