zip-iterator
Version:
Extract contents from zip archive type using an iterator API using streams or paths. Use stream interface and pipe transforms to add decompression algorithms
16 lines (15 loc) • 501 B
text/typescript
/**
* Parse External File Attributes
*
* Extracts file type and permissions from ZIP external attributes.
* Based on: https://github.com/bower/decompress-zip/blob/master/lib/structures.js
*/
import type { Mode } from 'fs';
export interface Attributes {
platform: string;
type: 'file' | 'directory' | 'link' | 'symlink';
mode: Mode;
mtime?: number;
path?: string;
}
export default function parseExternalFileAttributes(externalAttributes: number, platform: number): Attributes;