Library API
    Preparing search index...

    Function opfsWrite

    • Writes text or binary data to a file in the browser OPFS virtual filesystem. Automatically creates parent directories as needed. Note: Stored as plaintext readable by same-origin scripts. Direct callers requiring encrypted-at-rest storage must use getFileStore.

      Parameters

      • path: string

        Virtual path relative to OPFS root (e.g. "vault/data.json")

      • content: string | BufferSource

        String, ArrayBuffer, or Uint8Array data to write

      Returns Promise<void>