| 16 | * In node, this is the object you receive when you `require('browserfs')`. |
| 17 | */ |
| 18 | export interface BrowserFS { |
| 19 | /** |
| 20 | * Exposes all of the file system backends available in BrowserFS. |
| 21 | */ |
| 22 | FileSystem: typeof Backends; |
| 23 | /** |
| 24 | * Emulates Node's `require()` function for filesystem-related modules (`'fs'`, `'path'`, `'buffer'`, etc). |
| 25 | */ |
| 26 | BFSRequire: typeof BFSRequire; |
| 27 | /** |
| 28 | * You must call this function with a properly-instantiated root file system |
| 29 | * before using any file system API method. |
| 30 | * @param rootFS The root filesystem to use for the |
| 31 | * entire BrowserFS file system. |
| 32 | */ |
| 33 | initialize(rootFS: FileSystem): void; |
| 34 | /** |
| 35 | * Installs BrowserFS onto the given object. |
| 36 | * We recommend that you run install with the 'window' object to make things |
| 37 | * global, as in Node. |
| 38 | * |
| 39 | * Properties installed: |
| 40 | * |
| 41 | * * Buffer |
| 42 | * * process |
| 43 | * * require (we monkey-patch it) |
| 44 | * |
| 45 | * This allows you to write code as if you were running inside Node. |
| 46 | * @param obj The object to install things onto (e.g. window) |
| 47 | */ |
| 48 | install(obj: any): void; |
| 49 | } |
no outgoing calls
no test coverage detected