Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface BrowserFS

BrowserFS's main interface.

In the browser, this is exposed as the BrowserFS global.

In node, this is the object you receive when you require('browserfs').

Hierarchy

  • BrowserFS

Index

Properties

BFSRequire

BFSRequire: BFSRequire

Emulates Node's require() function for filesystem-related modules ('fs', 'path', 'buffer', etc).

FileSystem

FileSystem: object

Exposes all of the file system backends available in BrowserFS.

Type declaration

Methods

initialize

  • You must call this function with a properly-instantiated root file system before using any file system API method.

    Parameters

    • rootFS: FileSystem

      The root filesystem to use for the entire BrowserFS file system.

    Returns void

install

  • install(obj: any): void
  • Installs BrowserFS onto the given object. We recommend that you run install with the 'window' object to make things global, as in Node.

    Properties installed:

    • Buffer
    • process
    • require (we monkey-patch it)

    This allows you to write code as if you were running inside Node.

    Parameters

    • obj: any

      The object to install things onto (e.g. window)

    Returns void

Generated using TypeDoc