forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

A question on the ATTR argument to FILES@

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> General
View previous topic :: View next topic  
Author Message
brucebowler
Guest





PostPosted: Mon May 15, 2006 1:23 pm    Post subject: A question on the ATTR argument to FILES@ Reply with quote

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

PostPosted: Mon May 15, 2006 2:10 pm    Post subject: A question on the ATTR argument to FILES@ Reply with quote

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
View user's profile Send private message
brucebowler
Guest





PostPosted: Mon May 15, 2006 2:13 pm    Post subject: A question on the ATTR argument to FILES@ Reply with quote

Ooops... You seem to have left out the pointer to "here"...
Back to top
Andrew



Joined: 09 Sep 2004
Posts: 232
Location: Frankfurt, Germany

PostPosted: Mon May 15, 2006 2:14 pm    Post subject: A question on the ATTR argument to FILES@ Reply with quote

Fixed... sorry, a little eager to submit then Smile
Back to top
View user's profile Send private message
brucebowler
Guest





PostPosted: Mon May 15, 2006 2:25 pm    Post subject: A question on the ATTR argument to FILES@ Reply with quote

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

PostPosted: Mon May 15, 2006 2:27 pm    Post subject: A question on the ATTR argument to FILES@ Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> General All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group