WasiPreopenedDirectory Class

A directory that a WASI module can access (see WasiOptions.PreopenedDirectories).

public sealed class WasiPreopenedDirectory

Constructors

NameDescription
WasiPreopenedDirectory(string, WasiFileSystem)Initializes a new instance of the WasiPreopenedDirectory class.

WasiPreopenedDirectory(string, WasiFileSystem)

WasiOptions.cs

Initializes a new instance of the WasiPreopenedDirectory class.

public WasiPreopenedDirectory(string guestPath, WasiFileSystem fileSystem)

Parameters

guestPath string
The path of the directory for the module (fd_prestat_dir_name), such as /, /data or .: the C library of WASI (wasi-libc) opens the paths that start with it in this directory.
fileSystem WasiFileSystem
The files of the directory.

Exceptions

ArgumentException
guestPath is empty or contains a null character.

Properties

NameDescription
FileSystemGets the files of the directory.
GuestPathGets the path of the directory for the module.

FileSystem

WasiOptions.cs

Gets the files of the directory.

public WasiFileSystem FileSystem { get; }

Property value

WasiFileSystem

Gets the path of the directory for the module.

public string GuestPath { get; }

Property value

string