Skip to content

napi-rs/tar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

9bc5739 · Apr 14, 2025

History

75 Commits
Jul 21, 2024
Feb 2, 2025
Dec 3, 2023
Apr 14, 2025
Jul 21, 2024
Jul 21, 2024
Dec 4, 2024
Dec 3, 2023
Dec 3, 2023
Apr 29, 2024
Dec 3, 2023
Dec 3, 2023
Apr 14, 2025
Feb 2, 2025
Dec 3, 2023
Dec 3, 2023
Apr 29, 2024
Dec 3, 2023
Dec 4, 2024
Dec 4, 2024
Apr 14, 2025
Dec 3, 2023
Dec 3, 2023
Jul 21, 2024
Apr 29, 2024
Jul 21, 2024
Apr 29, 2024
Apr 29, 2024
Apr 10, 2025

Repository files navigation

@napi-rs/tar

https://github.com/napi-rs/tar/actions install size Downloads

Node.js tar binding https://docs.rs/tar/latest/tar/

Usage

export class Entries {
  [Symbol.iterator](): Iterator<Entry, void, void>
}
export class Entry {
  path(): string | null
}
export class Archive {
  /** Create a new archive with the underlying path. */
  constructor(path: string)
  entries(): Entries
  /**
   * Unpacks the contents tarball into the specified `dst`.
   *
   * This function will iterate over the entire contents of this tarball,
   * extracting each file in turn to the location specified by the entry's
   * path name.
   *
   * This operation is relatively sensitive in that it will not write files
   * outside of the path specified by `dst`. Files in the archive which have
   * a '..' in their path are skipped during the unpacking process.
   */
  unpack(to: string): void
}

Install this test package

yarn add @napi-rs/tar
pnpm install @napi-rs/tar
npm install @napi-rs/tar