Files
SnowLuma/.pnpm-store/v11/files/57/5ff593cc854bf92313dfc717c776f6b8ff325a578a173ed1b34709c8c0681a225acb90b64260ce060299f3ae8714558afa39828ef756ccd6d88ab5d5b2f9ee
TanTan 2a69b23b47
Dev Build / cleanup (push) Canceled after 0s
Dev Build / typecheck (push) Canceled after 0s
Dev Build / build (linux-arm64, ubuntu-24.04-arm, linux-arm64) (push) Canceled after 0s
Dev Build / build (linux-x64, ubuntu-latest, linux-x64) (push) Canceled after 0s
Dev Build / build (win-x64, windows-latest, win32-x64) (push) Canceled after 0s
Dev Build / dispatch-dev-docker (push) Skipped
docs: 仓库链接指向本镜像仓库
2026-11-13 09:27:07 +08:00

65 lines
1.6 KiB
Plaintext

export const isCode = (c) => name.has(c);
export const isName = (c) => code.has(c);
/**
* types that are a normal file system entry, not metadata.
*
* These can be the subject of extended/globalExtended headers, long path
* names, long linkpath names, etc.
*
* Any other types are meta, and cannot be targetted by extended PAX headers.
*/
export const normalFsTypes = new Set([
'0',
'',
'1',
'2',
'3',
'4',
'5',
'6',
'7',
'D',
]);
// map types from key to human-friendly name
export const name = new Map([
['0', 'File'],
// same as File
['', 'OldFile'],
['1', 'Link'],
['2', 'SymbolicLink'],
// Devices and FIFOs aren't fully supported
// they are parsed, but skipped when unpacking
['3', 'CharacterDevice'],
['4', 'BlockDevice'],
['5', 'Directory'],
['6', 'FIFO'],
// same as File
['7', 'ContiguousFile'],
// pax headers
['g', 'GlobalExtendedHeader'],
['x', 'ExtendedHeader'],
// vendor-specific stuff
// skip
['A', 'SolarisACL'],
// like 5, but with data, which should be skipped
['D', 'GNUDumpDir'],
// metadata only, skip
['I', 'Inode'],
// data = link path of next file
['K', 'NextFileHasLongLinkpath'],
// data = path of next file
['L', 'NextFileHasLongPath'],
// skip
['M', 'ContinuationFile'],
// like L
['N', 'OldGnuLongPath'],
// skip
['S', 'SparseFile'],
// skip
['V', 'TapeVolumeHeader'],
// like x
['X', 'OldExtendedHeader'],
]);
// map the other direction
export const code = new Map(Array.from(name).map(kv => [kv[1], kv[0]]));
//# sourceMappingURL=types.js.map