Linux command
asar 命令
文件
复制后可按需替换文件名、目录或参数。
常用示例
Create
asar pack [dir/] [output.asar]
Extract
asar extract [archive.asar] [output_dir/]
List
asar list [archive.asar]
Example
asar extract-file [archive.asar] [path/in/archive] [output_file]
说明
asar creates and extracts Electron archive files. ASAR (Atom Shell Archive) is a tar-like format used by Electron applications to package source files into a single file while maintaining random access capability. The format allows Electron to read files directly from the archive without extraction, improving load times.
参数
- pack _dir_ _output_
- Create archive from directory
- extract _archive_ _dest_
- Extract archive to directory
- list _archive_
- List archive contents
- extract-file _archive_ _file_ _dest_
- Extract single file
FAQ
What is the asar command used for?
asar creates and extracts Electron archive files. ASAR (Atom Shell Archive) is a tar-like format used by Electron applications to package source files into a single file while maintaining random access capability. The format allows Electron to read files directly from the archive without extraction, improving load times.
How do I run a basic asar example?
Run `asar pack [dir/] [output.asar]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does pack _dir_ _output_ do in asar?
Create archive from directory