See more on Chunks in general.
This is a “FAT Attributes”, actually FAT, FAT32, and NTFS style attribute bits.
|r (range of instances)||all used in the general manner.|
|p (multi-part) & c|
|y (payload specification)|
|i (instance sizes)||Cleared.|
FATR-nd has a distinct meaning, documented below.
The y flag may be present. A FATR-r containing lots of identical instances may compress very well.
Set to 65.
The Instance Number matches the Instance Number of the DATA it applies to, as with any a-flagged chunk type.
The Payload contains a 16-bit or 32-bit Big-Endian value that contains what the Win32 GetFileAttributes would report for the file on a Windows system. If 16-bit values are used, the high bits are assumed to be zero. This is the usual case, since no bits are defined in that range yet. All instances in the same FATR-r cluster must use the same size! 16-bit is normal; 32-bit is defined for future expansion.
The bit meanings are as follows:
|0x00000001||FILE_ATTRIBUTE_READONLY||Programs may not write to or delete a file, or delete a directory, without first clearing this attribute. This bit overrides the read-only common flag in the INDX. Windows systems only have one such bit rather than separate owner/group/all bits, so has a similar meaning to read-only for all on a UNIX permission mode.|
|0x00000002||FILE_ATTRIBUTE_HIDDEN||The Hidden and System bits don’t make the file or directory do anything special in Windows. The only thing they effect is that Hidden files are not returned from a directory listing unless asked for specifically. They are used in the GUI shell to a larger degree; it objects to deleting system files more strenuously, and uses the System flag on a directory to enable a customized file listing in the Explorer.|
|0x00000010||FILE_ATTRIBUTE_DIRECTORY||Item is a Directory rather than a file.|
|0x00000020||FILE_ATTRIBUTE_ARCHIVE||The Archive bit is set automatically every time a file or directory is written to. This is used as a simple way to note which files need to be backed up, if you clear the Archive bit upon making a backup. Other than this convention, this flag means nothing to the Windows operating system.|
|0x00000040||FILE_ATTRIBUTE_ENCRYPTED||Windows has encrypted file system support built-in to NTFS. Setting this attribute on a file residing on a supported volume will make the OS encrypt the file so it can be read only by the owner. For a directory, it flags that all files written-to within that directory will be encrypted by default.|
|0x00000080||FILE_ATTRIBUTE_NORMAL||Means that no other bits are set. For some reason, this is distinct from simply using zero.|
|0x00000100||FILE_ATTRIBUTE_TEMPORARY||Set for temporary files. Why would anyone restore a temporary file from an archive? Well, this doesn’t make the file automatically delete-on-close in Windows. Rather, the only thing it does in Windows is act as a hint to the way files are cached. It’s a good idea for applications to set the Temporary bit when making a temp file, but this bit does not enforce a particular usage or add any semantics of its own.|
|0x00000200||FILE_ATTRIBUTE_SPARSE_FILE||The file system is representing entire allocation units filled with zeros by not allocating any disk storage to it and remembering the gap by leaving it out of its logical-to-physical mapping system. An operating system or file system might be able to do this without having an explicit flag for the purpose. If restoring a file with this flag set, an application can take care to trigger this behavior e.g. look for long strings of zero bytes and seek past them rather than writing them.|
|0x00000400||FILE_ATTRIBUTE_REPARSE_POINT||In Windows NTFS, a Reparse Point is a generalization of a symbolic link. The item is not a file or a directory, but triggers code to jump to some other location in the OS’s name space. An implementation can probably ignore this flag when extracting a file from an archive, since any relevant information (e.g. is it s symbolic link) will be stored in a portable manner in the ZIP2 file.|
|0x00000800||FILE_ATTRIBUTE_COMPRESSED||In Windows, this means that the file system is compressing the file transparantly to any application. For a directory, it means that files created or written to within that directory will be compressed. When restoring such a file, the implementation should enable this kind of capability if supported by the platform.|
|0x00001000||FILE_ATTRIBUTE_OFFLINE||In Windows, this means that the file has been moved to a remote storage location. If restoring such a file, the implementation can tell a remote storage manager that this file should migrate out of primary storage.|
|In Windows, a content indexing service indexes files for fast searches. If this flag is set, the indexing service (deamon) will skip it. When restoring a file with this flag set, an implementation on a platform with some similar feature can use it as such.|
A portion number, as with DATA.
Page content copyright 2003 by John M. Dlugosz. Home:http://www.dlugosz.com, email:mailto:email@example.com