♻️ readSsnFile now reads all file entries
This commit is contained in:
parent
1a623aa42d
commit
9899514578
4 changed files with 202 additions and 147 deletions
29
src/interfaces/ISsnFileEntry.ts
Normal file
29
src/interfaces/ISsnFileEntry.ts
Normal file
|
@ -0,0 +1,29 @@
|
|||
enum SsnDiffType {
|
||||
/** We included the original file contents, not just the differences, because file is new or it's in a format that's not suitable for diffing. */
|
||||
NewFile = 0,
|
||||
/** File is not included in the .zip archive because it has been deleted. */
|
||||
Deleted = 1,
|
||||
/** File has changed and we include the differences, encoded in vcdiff/xdelta3 */
|
||||
Changed = 2,
|
||||
/** File is not included in the .zip archive because it hasn't changed */
|
||||
Unchanged = 3,
|
||||
}
|
||||
|
||||
interface ISsnFileEntry {
|
||||
/** CRC-32 checksum of this file. */
|
||||
crc: number;
|
||||
/** If we only store the differences, the size of the destination file. */
|
||||
diffDestLength: number;
|
||||
/** If we only store the differences, the size of the source file. */
|
||||
diffSourceLength: number;
|
||||
/** Whether this file was changed or not, or whether it was newly added or deleted. */
|
||||
diffType: SsnDiffType;
|
||||
/** The date and time when this file was last modified. */
|
||||
lastMod: Date;
|
||||
/** File name */
|
||||
name: string;
|
||||
/** Uncompressed size */
|
||||
size: number;
|
||||
}
|
||||
|
||||
export default ISsnFileEntry;
|
Loading…
Add table
Add a link
Reference in a new issue