ZipExtractionFileSystem
The slice of node:fs extraction needs.
Only the two WRITING calls are required, and that is deliberate: Electron’s asar layer intercepts fs READS (and existsSync) on any path containing .asar, which a demo vault may legitimately ship as a plain file. Never probing the target with a read keeps that interception out of the picture entirely, and a caller that hands over Electron’s original-fs is safe even from the write side.
Import:
import type { ZipExtractionFileSystem } from 'obsidian-dev-utils/desktop-zip-extractor';Signature:
export interface ZipExtractionFileSystemMethods
| Method | Returns | Description |
|---|---|---|
| mkdirSync(path, options) | string | undefined | Creates a directory, including any missing parents. |
| writeFileSync(path, data) | void | Writes a file, overwriting it if it exists. |
Links to this page: