• Home
  • Raw
  • Download

Lines Matching refs:tar

1 # node-tar
3 …![Build Status](https://travis-ci.org/npm/node-tar.svg?branch=master)](https://travis-ci.org/npm/n…
7 The API is designed to mimic the behavior of `tar(1)` on unix systems.
8 If you are familiar with how tar works, most of this will hopefully be
14 A "tar file" or "tarball" is an archive of file system entries
16 If you run `man tar` on almost any Unix command line, you'll learn
32 single-character name (for unix nerds familiar with `tar(1)`) as well
68 Some things cause tar to emit a warning, but should usually not cause
76 to the `'warn'` event on any tar stream. The function will get
86 The API mimics the `tar(1)` command line functionality, with aliases
88 if you know how to use `tar(1)` in Unix, then you know how to use
89 `require('tar')` in JavaScript.
91 To replicate `tar czf my-tarball.tgz files and folders`, you'd do:
94 tar.c(
103 To replicate `tar cz files and folders > my-tarball.tgz`, you'd do:
106 tar.c( // or tar.create
114 To replicate `tar xf my-tarball.tgz` you'd do:
117 tar.x( // or tar.extract(
124 To replicate `cat my-tarball.tgz | tar x -C some-dir --strip=1`:
128 tar.x({
135 To replicate `tar tf my-tarball.tgz`, do this:
138 tar.t({
144 To replicate `cat my-tarball.tgz | tar t` do:
148 .pipe(tar.t())
164 The arguments list to `tar t` and `tar x` specify a list of filenames
168 For those who _aren't_ fans of tar's single-character command names:
171 tar.c === tar.create
172 tar.r === tar.replace (appends to archive, file is required)
173 tar.u === tar.update (appends if newer, file is required)
174 tar.x === tar.extract
175 tar.t === tar.list
181 ### tar.c(options, fileList, callback) [alias: tar.create]
188 An entry in `fileList` that starts with an `@` symbol is a tar archive
200 will be fully written after the call to `tar.c`. If this is set,
231 `tar.update` or the `keepNewer` option with the resulting tar archive.
249 ### tar.x(options, fileList, callback) [alias: tar.extract]
256 If the archive is gzipped, then tar will detect this and unzip it.
292 tar overwrites existing files, which preserves existing hardlinks.
302 - `preserveOwner` If true, tar will set the `uid` and `gid` of
307 `tar(1)`, but ACLs and other system-specific data is never unpacked
348 ### tar.t(options, fileList, callback) [alias: tar.list]
355 If the archive is gzipped, then tar will detect this and unzip it.
358 `tar.ReadEntry` objects. However, they don't emit `'data'` or `'end'`
360 `tar.Parse` class instead.)
386 ### tar.u(options, fileList, callback) [alias: tar.update]
394 An entry in `fileList` that starts with an `@` symbol is a tar archive
403 will be fully written after the call to `tar.c`.
432 `tar.update` or the `keepNewer` option with the resulting tar archive.
437 ### tar.r(options, fileList, callback) [alias: tar.replace]
445 An entry in `fileList` that starts with an `@` symbol is a tar archive
454 will be fully written after the call to `tar.c`.
483 `tar.update` or the `keepNewer` option with the resulting tar archive.
491 ### class tar.Pack
493 A readable tar stream.
536 `tar.update` or the `keepNewer` option with the resulting tar archive.
552 ### class tar.Pack.Sync
554 Synchronous version of `tar.Pack`.
556 ### class tar.Unpack
558 A writable stream that unpacks a tar archive onto the file system.
591 tar overwrites existing files, which preserves existing hardlinks.
606 - `preserveOwner` If true, tar will set the `uid` and `gid` of
611 `tar(1)`, but ACLs and other system-specific data is never unpacked
640 ### class tar.Unpack.Sync
642 Synchronous version of `tar.Unpack`.
649 ### class tar.Parse
651 A writable stream that parses a tar archive stream. All the standard
654 If the archive is gzipped, then tar will detect this and unzip it.
656 Emits `'entry'` events with `tar.ReadEntry` objects, which are
667 `tar.ReadEntry` objects.
685 ### class tar.ReadEntry extends [MiniPass](http://npm.im/minipass)
687 A representation of an entry that is being read out of a tar archive.
710 ### class tar.WriteEntry extends [MiniPass](http://npm.im/minipass)
713 system into a tar archive.
756 `tar.update` or the `keepNewer` option with the resulting tar archive.
788 `tar.update` or the `keepNewer` option with the resulting tar archive.
799 ### class tar.WriteEntry.Sync
801 Synchronous version of tar.WriteEntry
803 ### class tar.WriteEntry.Tar
805 A version of tar.WriteEntry that gets its data from a tar.ReadEntry
825 `tar.update` or the `keepNewer` option with the resulting tar archive.
827 ### class tar.Header
834 `0x00` null bytes. (Useful because tar files are terminated by
868 as a tar Header starting at the specified offset and continuing for
870 object, and eventually encode as a tar Header.
889 ### class tar.Pax
895 the same semantics as the tar.Header field of the same name.
935 ### tar.Pax.parse(string, extended, global)
944 ### tar.types
946 A translation table for the `type` field in tar headers.
948 #### tar.types.name.get(code)
952 #### tar.types.code.get(name)