You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/WasiConfiguration.cs
+47-5Lines changed: 47 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,40 @@
7
7
8
8
namespaceWasmtime
9
9
{
10
+
/// <summary>
11
+
/// The permissions granted for a directory when preopening it.
12
+
/// </summary>
13
+
[Flags]
14
+
publicenumWasiDirectoryPermissions
15
+
{
16
+
/// <summary>
17
+
/// This directory can be read, for example its entries can be iterated.
18
+
/// </summary>
19
+
Read=1,
20
+
21
+
/// <summary>
22
+
/// This directory can be written to, for example new files can be created within it.
23
+
/// </summary>
24
+
Write=2
25
+
}
26
+
27
+
/// <summary>
28
+
/// The permissions granted for files when preopening a directory.
29
+
/// </summary>
30
+
[Flags]
31
+
publicenumWasiFilePermissions
32
+
{
33
+
/// <summary>
34
+
/// Files can be read.
35
+
/// </summary>
36
+
Read=1,
37
+
38
+
/// <summary>
39
+
/// Files can be written to.
40
+
/// </summary>
41
+
Write=2
42
+
}
43
+
10
44
/// <summary>
11
45
/// Represents a WASI configuration.
12
46
/// </summary>
@@ -249,13 +283,19 @@ public WasiConfiguration WithInheritedStandardError()
249
283
returnthis;
250
284
}
251
285
286
+
287
+
252
288
/// <summary>
253
289
/// Adds a preopen directory to the configuration.
254
290
/// </summary>
255
291
/// <param name="path">The path to the directory to add.</param>
256
292
/// <param name="guestPath">The path the guest will use to open the directory.</param>
293
+
/// <param name="directoryPermissions">The permissions that wasm will have to operate on <paramref name="guestPath"/>. This can be used, for example, to provide readonly access to a directory.</param>
294
+
/// <param name="filePermissions">The permissions that wasm will have for any file in this directory.</param>
257
295
/// <returns>Returns the current configuration.</returns>
0 commit comments