Interface: WebRFS

WebR.WebRFS

The webR FS API for interacting with the Emscripten Virtual File System.

Table of contents

Properties

Properties

lookupPath

lookupPath: (path: string) => Promise<FSNode>

Lookup information about a file or directory node in the Emscripten virtual file system.

Type declaration

▸ (path): Promise<FSNode>

Parameters
Name Type Description
path string Path to the requested node.
Returns

Promise<FSNode>

Defined in

webR/webr-main.ts:52


mkdir

mkdir: (path: string) => Promise<FSNode>

Create a directory on the Emscripten virtual file system.

Type declaration

▸ (path): Promise<FSNode>

Parameters
Name Type Description
path string Path of the directory to create.
Returns

Promise<FSNode>

Defined in

webR/webr-main.ts:58


readFile

readFile: (path: string, flags?: string) => Promise<Uint8Array>

Get the content of a file on the Emscripten virtual file system.

Type declaration

▸ (path, flags?): Promise<Uint8Array>

Parameters
Name Type Description
path string Path of the file to read.
flags? string Open the file with the specified flags.
Returns

Promise<Uint8Array>

Defined in

webR/webr-main.ts:65


rmdir

rmdir: (path: string) => Promise<void>

Remove a directory on the Emscripten virtual file system.

Type declaration

▸ (path): Promise<void>

Parameters
Name Type Description
path string Path of the directory to remove.
Returns

Promise<void>

Defined in

webR/webr-main.ts:70


writeFile

writeFile: (path: string, data: ArrayBufferView, flags?: string) => Promise<void>

Write a new file to the Emscripten virtual file system.

Type declaration

▸ (path, data, flags?): Promise<void>

Parameters
Name Type Description
path string Path of the new file.
data ArrayBufferView The content of the new file.
flags? string Open the file with the specified flags.
Returns

Promise<void>

Defined in

webR/webr-main.ts:77