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:54
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:60
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:67
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:72
unlink
• unlink: (path
: string
) => Promise
<void
>
Unlink a node on the Emscripten virtual file system. If that node was the last link to a file it is is deleted.
Type declaration
▸ (path
): Promise
<void
>
Parameters
Name | Type | Description |
---|---|---|
path |
string |
Path of the target node. |
Returns
Promise
<void
>
Defined in
webR/webr-main.ts:85
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:79