Virtual Filesystem & In-Vault Live Editing: The Complete Guide

How to edit text documents, write notes, and re-encrypt an entire .zsafe vault in-browser without leaving temporary files on your hard drive.

1. What is an Ephemeral Virtual Filesystem?

In legacy archive tools (like standard ZIP or 7-Zip utilities), editing a file inside an encrypted archive requires extracting the unencrypted file to an operating system temporary directory (e.g. C:\Users\AppData\Local\Temp or /tmp).

This poses severe operational security risks:

🛡️ The ZevSafe VFS Paradigm

ZevSafe completely eliminates disk writes during editing. When you unlock a vault, the Virtual Filesystem (VFS) maintains an in-RAM catalog and dynamic overlay. All reads, text edits, note creations, and file renames occur in volatile JavaScript heap memory.

2. Opening & Editing Code, Text, and Markdown

When exploring an unlocked vault in the Web Vault Explorer:

  1. Click on any supported document file (such as .txt, .md, .json, .js, .html, .csv, or .py).
  2. The decrypted document viewer modal opens instantly using cached ephemeral keys.
  3. Click the ✏️ Edit button in the viewer header. (Notice that the text editor engine js/text-editor.js is lazy-loaded strictly on this first click to preserve performance).
  4. Edit your text with live syntax-aware line numbering, automatic 4-space tab indentation, and word wrap.
  5. Press Ctrl+S (or Cmd+S on macOS) or click Save Changes.

3. Creating New Encrypted Notes On the Fly

You don't need to create a text file on your computer and encrypt an entirely new vault just to jot down private notes, recovery seeds, or credentials.

4. Under the Hood: The In-Memory Overlay Map

How does ZevSafe keep track of your changes while the original .zsafe (or .zev) file remains sealed?

JavaScript Architecture · In-Session Overlay Map
// In app.js & currentV3Vault session state:
currentV3Vault.editedFiles = new Map();

// When you save an edit:
function saveEditedDocument(filePath, contentString) {
    const encoder = new TextEncoder();
    const utf8Bytes = encoder.encode(contentString);
    const overlayBlob = new Blob([utf8Bytes], { type: 'text/plain' });
    
    // Stage into overlay map without touching disk
    currentV3Vault.editedFiles.set(filePath, {
        blob: overlayBlob,
        size: utf8Bytes.length,
        modified: Date.now()
    });
}

Whenever you preview, download, or re-encrypt, ZevSafe checks the editedFiles overlay map first. If a file path matches, it serves the modified in-RAM version; otherwise, it extracts the original stream chunk.

5. Direct Re-Encryption: Packaging Edits Back into .zsafe

Once you finish editing, you don't need to export a ZIP and go back to the Lock screen.

  1. Click the 🔒 Direct Re-Encrypt (.zsafe) button in the Vault Explorer top bar.
  2. ZevSafe prompts you to confirm your master passphrase (or set a new one).
  3. The parallel worker pipeline streams both the original unmodified files and the edited overlay blobs into a fresh, authenticated ZV3\0 STREAM AEAD container.
  4. Your browser saves the updated .zsafe file directly to your downloads or storage destination.

6. Anti-Forensic Benefits: Zero Disk Traces

Because all edits happen in ephemeral browser memory: