Skip to documentation
SLOP

tiny.sandbox.Layer

Reference tiny.sandbox Layer

Defined in layer.

API (8)

Actions

Public operations.

Fields and members

Public fields and members.

No direct callersNo direct callslayerLayer
Static calls · unresolved targets: unknown · external targets: unknown.

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

Definitions3
Public names6
Members6
Version26.7.0
Revisiondaab053ee433