value
Function parameters
Parameters
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
pub fn value(self: Attribute, dst: []u8) ![]const u8 {
if (self.len > dst.len) return error.TarInsufficientBuffer;
// assert(self.len <= dst.len);
const buf = dst[0..self.len];
const n = try self.reader.readSliceShort(buf);
if (n < self.len) return error.UnexpectedEndOfStream;
try validateAttributeEnding(self.reader);
if (hasNull(buf)) return error.PaxNullInValue;
return buf;
}