tiny.sandbox.Layer
Defined in layer.
API (8)
Actions
Public operations.
Fields and members
Public fields and members.
Source
Source: lib/sandbox/src/layer.zig:18
zig
pub const Layer = struct { allocator: Allocator, scratch: sys.fs.Dir, root: sys.fs.Dir, path: []u8, cleanup: bool = true, skipped: std.ArrayList([]u8) = .empty, pub fn deinit(self: *Layer) void { self.root.close(fs_io); if (self.cleanup) self.scratch.deleteTree(fs_io, self.path) catch {}; for (self.skipped.items) |item| self.allocator.free(item); self.skipped.deinit(self.allocator); self.allocator.free(self.path); self.* = undefined; } pub fn readFileAlloc(self: *const Layer, allocator: Allocator, path: []const u8, limit: usize) ![]u8 { return try self.root.readFileAlloc(fs_io, path, allocator, .limited(limit)); }};Source: lib/sandbox/src/root.zig:54
zig
pub const Layer = layer.Layer;Audit
| Definitions | 3 |
|---|---|
| Public names | 6 |
| Members | 6 |
| Version | 26.7.0 |
| Revision | daab053ee433 |