something like :
DECLARE INTEGER GetFileAttributes in win32api string @
FUNCTION file_int_properties && _GetFileAttributes
LPARAMETERS lpFileName AS string
LOCAL m.lnAttributs, lcAttributs
lnAttributs= GetFileAttributes(@m.lpFileName)
IF m.lnAttributs=-1
RETURN ''
ENDIF
lcAttributs=''
If BITAND(m.lnAttributs,1)=1 && FILE_ATTRIBUTE_READONLY
lcAttributs= m.lcAttributs+'R'
ENDIF
If BITAND(m.lnAttributs,2)=2 && FILE_ATTRIBUTE_HIDDEN
lcAttributs= m.lcAttributs+'H'
ENDIF
If BITAND(m.lnAttributs,4)=4 && FILE_ATTRIBUTE_SYSTEM
lcAttributs= m.lcAttributs+'S'
ENDIF
If BITAND(m.lnAttributs,16)=16 && FILE_ATTRIBUTE_DIRECTORY
lcAttributs= m.lcAttributs+'D'
ENDIF
If BITAND(m.lnAttributs,32)=32 && FILE_ATTRIBUTE_ARCHIVE
lcAttributs= m.lcAttributs+'A'
ENDIF
If BITAND(m.lnAttributs,128)=128 && FILE_ATTRIBUTE_NORMAL
lcAttributs= m.lcAttributs+'N'
ENDIF
If BITAND(m.lnAttributs,512)=512 && FILE_ATTRIBUTE_TEMPORARY
lcAttributs= m.lcAttributs+'T'
ENDIF
If BITAND(m.lnAttributs,2048)=2048 && FILE_ATTRIBUTE_COMPRESSED
lcAttributs= m.lcAttributs+'C'
ENDIF
RETURN m.lcAttributs
ENDFUNC && int_attributs_fichier
In fact, I build a class (in a .prg) to 'translate' API calls about files and
directories in VFP methods
HTH
The Foxil
The Foxil
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[email protected]
** All postings, unless explicitly stated otherwise, are the opinions of the
author, and do not constitute legal or medical advice. This statement is added
to the messages for those lawyers who are too stupid to see the obvious.