setLinkname
Function parameters
Parameters
- w:*Header
- link:[]const u8
Options for writing file/dir/link.
Types
Sets prefix for all other write* method paths.
Functions
- setRoot
- Sets prefix for all other write* method paths.
- writeFileStream
- Writes file reading file content from `reader`.
- writeFileBytes
- Writes file using bytes buffer `content` for size and file content.
- finishPedantically
- According to the specification, tar should finish with two zero blocks, but
Error sets in this namespace
Error Sets
Source
Implementation
pub fn setLinkname(w: *Header, link: []const u8) !void {
if (link.len > w.linkname.len) return error.NameTooLong;
@memcpy(w.linkname[0..link.len], link);
}