DoxigAlpha

stripComponents

Function parameters

Parameters

#
path:[]const u8
count:u32

Type definitions in this namespace

Types

#
Diagnostics
Provide this to receive detailed error messages.
PipeOptions
pipeToFileSystem options
FileKind
Type of the file returned by iterator `next` method.
Iterator
Iterator over entries in the tar file represented by reader.

Saves tar file content to the file systems.

Functions

#
pipeToFileSystem
Saves tar file content to the file systems.

Source

Implementation

#
fn stripComponents(path: []const u8, count: u32) []const u8 {
    var i: usize = 0;
    var c = count;
    while (c > 0) : (c -= 1) {
        if (std.mem.indexOfScalarPos(u8, path, i, '/')) |pos| {
            i = pos + 1;
        } else {
            i = path.len;
            break;
        }
    }
    return path[i..];
}