
Company News
Jerod Santo Joins Socket as Head of Media
Allow myself to introduce... myself.
@planitar/rnfs-untar
Advanced tools
rnfs-untar rnfs-untar is a utility for extracting files from TAR archives in React Native environments. This library provides both a low-level API for granular control and high-level API functions for common tasks such as listing all files, finding a specific file, and reading the entire TAR archive.
npm install @planitar/rnfs-untar
listFiles(tarFilePath: string): Promise<string[]>Lists all files in the TAR archive.
import { listFiles } from '@planitar/rnfs-untar';
listFiles('/path/to/tar/archive.tar').then(files => {
console.log('Files:', files);
});
findFile(tarFilePath: string, fileName: string): Promise<TarFile | null>Finds a specific file in the TAR archive.
import { findFile } from '@planitar/rnfs-untar';
findFile('/path/to/tar/archive.tar', 'specific/file.txt').then(file => {
if (file) {
console.log('File found:', file.header.name);
console.log('File content:', (await file.read()).toString('utf-8'));
} else {
console.log('File not found.');
}
});
readTar(tarFilePath: string, callback: (file: TarFile) => Promise<boolean | void>): Promise<void>Reads the entire TAR archive and calls the provided callback function for each file in the archive.
import { readTar } from '@planitar/rnfs-untar';
readTar('/path/to/tar/archive.tar', async (file) => {
console.log('File:', file.header.name);
console.log('Content:', (await file.read()).toString('utf-8'));
});
The low-level API provides direct access to the TarExtractor class.
import { TarExtractor } from '@planitar/rnfs-untar';
const tarExtractor = new TarExtractor();
tarExtractor.read('/path/to/tar/archive.tar', async (file) => {
console.log('File:', file.header.name);
console.log('Content:', (await file.read()).toString('utf-8'));
});
TarExtractorLow-level API for reading TAR archives.
read(tarFilePath: string, callback: (file: TarFile) => Promise<boolean | void>): Promise<void>Reads the TAR archive at the given file path and calls the provided callback function for each file in the archive.
TarFileRepresents a file in a TAR archive.
header: TarFileHeaderThe header information for the file.
read(): Promise<Buffer>Reads and returns the contents of the file as a Buffer.
TarFileHeaderRepresents the header of a file in a TAR archive.
name: stringThe name of the file.
size: numberThe size of the file.
typeFlag: stringThe type flag of the file.
ustarIndicator: stringThe ustar indicator of the file.
prefix: stringThe prefix of the file.
isPax(): booleanReturns true if the header is a PAX header, false otherwise.
FAQs
Extract files from TAR archives in React Native environments
The npm package @planitar/rnfs-untar receives a total of 0 weekly downloads. As such, @planitar/rnfs-untar popularity was classified as not popular.
We found that @planitar/rnfs-untar demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.

Company News
Allow myself to introduce... myself.

Research
/Security News
A Twitch browser extension on Chrome and Firefox forwards users’ live OAuth session tokens through proxies controlled by a Russian bot service.

Security News
Anthropic found biased reasoning and recklessness drove Claude Mythos 5 to publish malware on PyPI and compromise a security vendor.