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>

Type declaration

▸ (path): Promise<FSNode>

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

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

Promise<FSNode>

The requested node.

Defined in

webR/webr-main.ts:44


mkdir

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

Type declaration

▸ (path): Promise<FSNode>

Create a directory on the Emscripten virtual file system.

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

Promise<FSNode>

The newly created directory node.

Defined in

webR/webr-main.ts:50


readFile

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

Type declaration

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

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

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

Promise<Uint8Array>

The content of the requested file.

Defined in

webR/webr-main.ts:57


rmdir

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

Type declaration

▸ (path): Promise<void>

Remove a directory on the Emscripten virtual file system.

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

Promise<void>

Defined in

webR/webr-main.ts:62


writeFile

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

Type declaration

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

Write a new file to the Emscripten virtual file system.

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:69