1371e2ac0c61b9ce85a3c1118e860e6ed325f4ca2f3fac765abee7980ca258949c53d5e77f7ff492270d25a904c55bed289cb4b49de2aa5e3e04d20fc9d036 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. exports.code = exports.name = exports.isName = exports.isCode = void 0;
  4. const isCode = (c) => exports.name.has(c);
  5. exports.isCode = isCode;
  6. const isName = (c) => exports.code.has(c);
  7. exports.isName = isName;
  8. // map types from key to human-friendly name
  9. exports.name = new Map([
  10. ['0', 'File'],
  11. // same as File
  12. ['', 'OldFile'],
  13. ['1', 'Link'],
  14. ['2', 'SymbolicLink'],
  15. // Devices and FIFOs aren't fully supported
  16. // they are parsed, but skipped when unpacking
  17. ['3', 'CharacterDevice'],
  18. ['4', 'BlockDevice'],
  19. ['5', 'Directory'],
  20. ['6', 'FIFO'],
  21. // same as File
  22. ['7', 'ContiguousFile'],
  23. // pax headers
  24. ['g', 'GlobalExtendedHeader'],
  25. ['x', 'ExtendedHeader'],
  26. // vendor-specific stuff
  27. // skip
  28. ['A', 'SolarisACL'],
  29. // like 5, but with data, which should be skipped
  30. ['D', 'GNUDumpDir'],
  31. // metadata only, skip
  32. ['I', 'Inode'],
  33. // data = link path of next file
  34. ['K', 'NextFileHasLongLinkpath'],
  35. // data = path of next file
  36. ['L', 'NextFileHasLongPath'],
  37. // skip
  38. ['M', 'ContinuationFile'],
  39. // like L
  40. ['N', 'OldGnuLongPath'],
  41. // skip
  42. ['S', 'SparseFile'],
  43. // skip
  44. ['V', 'TapeVolumeHeader'],
  45. // like x
  46. ['X', 'OldExtendedHeader'],
  47. ]);
  48. // map the other direction
  49. exports.code = new Map(Array.from(exports.name).map(kv => [kv[1], kv[0]]));
  50. //# sourceMappingURL=types.js.map