From: Cheng Zhao Date: Wed, 12 Nov 2014 03:58:03 +0000 (+0800) Subject: docs: original-fs module X-Git-Tag: v0.19.2~15^2 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=bd1f0e78a8f34da243ec062f9f89cacb352650bd;p=electron.git docs: original-fs module --- diff --git a/docs/tutorial/application-packaging.md b/docs/tutorial/application-packaging.md index 42316244..a2dd5dab 100644 --- a/docs/tutorial/application-packaging.md +++ b/docs/tutorial/application-packaging.md @@ -95,6 +95,17 @@ var win = new BrowserWindow({width: 800, height: 600}); win.loadUrl('asar:/path/to/example.asar/static/index.html'); ``` +### Treating `asar` archive as normal file + +For some cases like verifying the `asar` archive's checksum, we need to read the +content of `asar` archive as file. For this purpose you can use the built-in +`original-fs` module which provides original `fs` APIs without `asar` support: + +```javascript +var originalFs = require('original-fs'); +originalFs.readFileSync('/path/to/example.asar'); +``` + ## Limitations on Node API Even though we tried hard to make `asar` archives in the Node API work like