Delphi - get file properties

xiaoxiao2021-03-06  109

Document Properties - Attribute?

(From delphi help "FindFirst function") The Attr parameter specifies the special files to include in addition to all normal files Choose from these file attribute constants when specifying the Attr parameter.:

-------------------------------------------------- ------------------------------

??? constant ?????? description ????? value ??? binary ??? FareadOnly ???? read-only files ?? 1 ????? 1 ??? Fahidden ???? ?? hidden files ????? 2 ????? 10 ??? fasystem file ????? 4 ????? 100 ??? FAVOLUMEID ???? Volume ID Files ?? 8 ????? 1000 ??? fadirectory ??? Directory files ?? 16 ???? 10000 ??? Faarchive ????? Archive files ???? 32 ???? 100000??? FAANYFILE ????? Any file ????????? 63 ???? 111111 (six)? Attributes can be combined by adding (delphi) or ing (C ) THEIR Constants or Values. for Example, TO Search for Read-Only and Hidden Files In Addition to Normal Files, Pass (FAREADOONLY FAHIDDEN) IN DELPHI OR (FAREADONLY | FAHIDDEN) IN C as the attr parameter.?ttr is integer, corresponding integer value see . This form of integers can be understood from binary. The presentation is used in each bit bit, and the FAANYFILE corresponds to all 1. ?

However, in some cases, the value of the ATTR attribute is not the value mentioned above. (XP system, Delphi7, NTFS compression) but a value such as 2064 (100000 010000, catalog), 2080 (100000 100000, Archive, file, file). (2048 ?) It can be found to become 12 bits. The significance in the subsequent six and the above table is consistent. ?

So, what is the finding file to be determined, and cannot see if it is equal to Faarchive, but to take out the six digits behind, and then determine. ??

-------------------------------------------------- ------------------------------

????????? C disk (XP, NTFS, uncompressed),. ?????????????????????????? ????????????? 16 general directory ??????????? 16 general file ?????????? 32 directory MATLAB6P5 ?????? 48 = 32 16 ?? Directory Program Files ?? 17 = 16 1 file autoexec.bat ??? 2 file arcsetup.exe ??? 39 = 1 2 4 32 file boot.ini ??????? 38 = 32 2 4 file iprpzi.hx ????? 34 = 32 2 directory MSOCACHE ??????? 19 = 1 2 16 directory system volume information 8214 = 16 2 4 100000 00010110 B ??????????????????????????????????? = 16 2 4 8192 (2048 * 4)? ?? D disk (NTFS, compression) under the directory ???????????????????????????????????????????????????????????????????? ??? 2080 = 2048 32 directory Recycler ?????????????????????? 2070 = 2048 22 = 2048 2 4 16 directory system volume information ???????? 22 = 2 4 16 files thumbs.db ????????? 2086 = 2 4 32 2048 file Treeinfo.wc ??????? 2050 = 2048 2 ??? H disk (Win2000, NTFS, Uncompressed) directory Program files ???????? 49 = 1 16 32 directory WinNT ???????????????? 48 = 16 32?

-------------------------------------------------- ------------------------------

?

转载请注明原文地址:https://www.9cbs.com/read-125377.html

New Post(0)