https://github.com/napi-rs/tar
Node.js tar binding https://docs.rs/tar/latest/tar/
https://github.com/napi-rs/tar
Last synced: 7 months ago
JSON representation
Node.js tar binding https://docs.rs/tar/latest/tar/
- Host: GitHub
- URL: https://github.com/napi-rs/tar
- Owner: napi-rs
- License: mit
- Created: 2023-12-03T08:45:16.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-04-14T23:52:38.000Z (7 months ago)
- Last Synced: 2025-04-15T00:33:14.528Z (7 months ago)
- Language: Rust
- Homepage:
- Size: 8.97 MB
- Stars: 10
- Watchers: 5
- Forks: 2
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# `@napi-rs/tar`

[](https://packagephobia.com/result?p=@napi-rs/tar)
[](https://npmcharts.com/compare/@napi-rs/tar?minimal=true)
> Node.js tar binding https://docs.rs/tar/latest/tar/
## Usage
```ts
export class Entries {
[Symbol.iterator](): Iterator
}
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
```