Skip to content
This repository has been archived by the owner on May 4, 2023. It is now read-only.
/ asar-fs Public archive

A rudimentary fs monkeypatch to support loading files and modules from an atom/asar archive.

License

Notifications You must be signed in to change notification settings

CKarper/asar-fs

Repository files navigation

asar-fs

Build Status Coverage Statusdependencies Status npm version

A rudimentary fs and module monkeypatch to support loading files and modules from an atom/asar archive.

Installation

npm i asar-fs

Usage

Example:

  const AsarFs = require('asar-fs');
  let asarFs = new AsarFs(__dirname + '/app.asar').patch();

constructor(archive)

This initializes the asar-fs instance, and will bind to the specified archive.

patch()

This will monkeypatch built-in modules for asar reading capabilities. Modules can be required from the archive, as well as fs readFile and readFileSync access.

unpatch()

This will remove any installed monkeypatches, restoring all modules back to their original state.

Related Projects

About

A rudimentary fs monkeypatch to support loading files and modules from an atom/asar archive.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published