init
Function parameters
Parameters
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 init(typeflag: FileType) Header {
return .{
.typeflag = typeflag,
.mode = switch (typeflag) {
.directory => default_mode.dir,
.symbolic_link => default_mode.sym_link,
.regular => default_mode.file,
else => default_mode.other,
},
};
}