source: trip-planner-front/node_modules/tar/lib/types.js@ 6a3a178

Last change on this file since 6a3a178 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 1.1 KB
Line 
1'use strict'
2// map types from key to human-friendly name
3exports.name = new Map([
4 ['0', 'File'],
5 // same as File
6 ['', 'OldFile'],
7 ['1', 'Link'],
8 ['2', 'SymbolicLink'],
9 // Devices and FIFOs aren't fully supported
10 // they are parsed, but skipped when unpacking
11 ['3', 'CharacterDevice'],
12 ['4', 'BlockDevice'],
13 ['5', 'Directory'],
14 ['6', 'FIFO'],
15 // same as File
16 ['7', 'ContiguousFile'],
17 // pax headers
18 ['g', 'GlobalExtendedHeader'],
19 ['x', 'ExtendedHeader'],
20 // vendor-specific stuff
21 // skip
22 ['A', 'SolarisACL'],
23 // like 5, but with data, which should be skipped
24 ['D', 'GNUDumpDir'],
25 // metadata only, skip
26 ['I', 'Inode'],
27 // data = link path of next file
28 ['K', 'NextFileHasLongLinkpath'],
29 // data = path of next file
30 ['L', 'NextFileHasLongPath'],
31 // skip
32 ['M', 'ContinuationFile'],
33 // like L
34 ['N', 'OldGnuLongPath'],
35 // skip
36 ['S', 'SparseFile'],
37 // skip
38 ['V', 'TapeVolumeHeader'],
39 // like x
40 ['X', 'OldExtendedHeader'],
41])
42
43// map the other direction
44exports.code = new Map(Array.from(exports.name).map(kv => [kv[1], kv[0]]))
Note: See TracBrowser for help on using the repository browser.