AbstractOptionalbrotli?: boolean | Record<string, unknown>Compress with the codec named brotli in codecs.
Optionalcodecs?: Codec[]Compression formats, before the gzip support of the runtime. The
options gzip, brotli, and zstd select the first codec that
has that name.
Optionalcompress?: Codec | [codec: Codec, options: Record<string, unknown>]Compress with this codec. It does not need to be in codecs.
With a pair, the second item is given to the compress function
of the codec.
Optionalcwd?: stringThe absolute path of the directory that the paths to add are
relative to. A pack needs it, and fs, to add a path. A path
that is not absolute is a TypeError.
Optionalfilter?: (path: string, entry: CreateStats | E) => booleanCalled with each path and its lstat result (its stat result
with follow), and with each entry of another archive. If it
returns false, the path or the entry is not added.
Optionalfollow?: booleanAdd the target of a symbolic link, not the link.
Optionalgzip?: boolean | Record<string, unknown>Compress with the codec named gzip.
OptionalmaxReadSize?: numberThe most bytes to read from a file at one time. Default, and
with 0, 16 MiB. A positive integer, or Infinity. A larger file
is not read before the pack comes to it.
Optionalmtime?: DateThe mtime of each entry.
OptionalnoDirRecurse?: booleanAdd a directory without the entries in it.
OptionalnoMtime?: booleanWrite no mtime.
OptionalnoPax?: booleanWrite no PAX header for a field that does not fit the header.
OptionalonWriteEntry?: (entry: WriteEntry) => unknownCalled with each entry before its header is written. It can change the fields of the entry.
Optionalplatform?: "win32" | "posix"With 'win32', each \ in a path is changed to /, and the
characters that winchars encodes are decoded.
Optionalportable?: booleanLeave out the data that is specific to one system: uid, gid,
uname, gname, atime, ctime, dev, ino, nlink, and
the mtime of a directory. Remove the write permission of the
group and of others.
Optionalprefix?: stringA directory to put before the path of each entry.
OptionalpreservePaths?: booleanKeep a root at the start of a path, such as /.
OptionalprocessUid?: numberThe user ID of the process.
OptionalprocessUname?: stringThe uname of each file that processUid owns.
Optionalzstd?: boolean | Record<string, unknown>Compress with the codec named zstd in codecs.
Optionalfs?: FSOptionalcodecThe compression of the output.
OptionalcodecOptionalcwdThe normalized form of opt.cwd.
True after end().
OptionalfsProtected OptionalheadThe options of WriteEntry.encode.
Protected OptionaltailProtected OptionalwakePut a path, an entry, or a source of entries at the end of the queue. A directory is added with all that is in it.
ProtectedaddedMake the entry to write for an entry that the caller added.
undefined if the filter refuses an entry of another archive.
ProtectedchangedReport a path that is a different object after its lstat.
ProtectedchildrenAdd no more. The archive ends after the last item of the queue.
ProtectedmissingReport a path that does not exist, and skip it. Each other error of the stat is thrown.
ProtectedneedsTrue if the pack must read the exact dev and ino of the
object with the bigint option: the numbers are not exact, and a
wrong match loses data. That is a file with more than one link,
which a wrong match makes a hard link to a different file, and
with follow a directory, which a wrong match skips as a
directory in itself. Each other object gets no second stat.
ProtectedpathMake the entry for a path.
ProtectedplanThe type of the entry to write for a path, or undefined to
write no entry. The pack calls it one time for each path, in the
order of the queue. id is the stat, or the exact dev and ino
of the object.
ProtectedpushThe absolute form of a path that is relative to cwd.
Protectedshift
The parts of
PackandPackSyncthat are the same: the options, the queue, and the rules that make an entry from a path or from an entry of another archive.