-
Notifications
You must be signed in to change notification settings - Fork 2
Allowing users to specify which file properties to list #117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| - `hash-index` - Index in the hash table where the file entry is. | ||
| - `name-hash1` - The first hash of the file name. | ||
| - `name-hash2` - The second hash of the file name. | ||
| - `name-hash3` - 64-bit Jenkins hash of the file name, used for searching in the HET table. | ||
| - `locale` - Locale info of the file. | ||
| - `file-index` - Index in the file table of the file. | ||
| - `byte-offset` - Offset of the file in the MPQ, relative to the MPQ header. | ||
| - `file-time` - Timestamp of the file. | ||
| - `file-size` - Uncompressed file size of the file, in bytes. | ||
| - `compressed-size` - Compressed file size of the file, in bytes. | ||
| - `encryption-key` - Encryption key for the file. | ||
| - `encryption-key-raw` - Encryption key for the file. | ||
| - `flags` - File flags for the file within MPQ: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The names and descriptions are from here: http://zezula.net/en/mpq/stormlib/sfilegetfileinfo.html
| * `i`: File is Imploded (By PKWARE Data Compression Library). | ||
| * `c`: File is Compressed (By any of multiple methods). | ||
| * `e`: File is Encrypted. | ||
| * `2`: File is Encrypted with key v2. | ||
| * `p`: File is a Patch file. | ||
| * `u`: File is stored as a single Unit, rather than split into sectors. | ||
| * `d`: File is a Deletion marker. Used in MPQ patches, indicating that the file no longer exists. | ||
| * `r`: File has Sector CRC checksums for each sector. This is ignored if the file is not compressed or imploded. | ||
| * `s`: Present on STANDARD.SNP\(signature). | ||
| * `x`: File exists; this is reset if the file is deleted. | ||
| * `m`: Mask for a file being compressed. | ||
| * `n`: Use default flags for internal files. | ||
| * `f`: Fix key; This is obsolete. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The flags and descriptions are from here: https://github.com/ladislav-zezula/StormLib/blob/b62de3c83fc146c4e8a05bde15d39e19588c28a4/src/StormLib.h#L220-L238
| """ | ||
| Test MPQ file listing with no parameters. | ||
| This test checks: | ||
| - That running the list command with no parameters renders a list of the files inside, with no details. | ||
| """ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just adding a description to a previous test, for consistency.
| """ | ||
| Test MPQ file listing of MPQ with weak signature. | ||
| This test checks: | ||
| - That handling MPQs with weak signatures generates the expected output. | ||
| """ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just adding a description to a previous test, for consistency.
23c927d to
c3e7967
Compare
c3e7967 to
4ef8dd8
Compare
|
Love this addition - will test with some of my archives and report back. |
Glad to hear you like it. Please do test. I'm a little unsure about the correct number of characters to use for some of these parameters. I think I got it right, but it could need slight tweaking. |
|
This was merged as part of #118. |
This allows power users to see the file properties they are interested in, when listing details in MPQ files. The default - if no properties are specified - will still print the same as before.
This PR also makes testing easier since it allows to check file content from tests without having to fiddle with dates which are timezone dependent.