Convenience alias that simplifies the interface for users
Thrown when a tar file is not readable or contains errors.
Policy class for reading and writing tar archives. Features: + Handles files and directories of arbitrary size + Files and directories may have permissions + Files and directories may optionally set an owner and group name/id. Limitations: + File paths may not exceed 255 characters - this is due to the format specification.
Enum class for types supported by tar files. Directory is given special treatment, all others have any content placed in the data field.
Helper struct for unix permissions
See Source File
http://github.com/rcythr/archive
Policy for the Archive template which provides reading and writing of Tar files.
Reading Usage:
import archive.tar; import std.stdio; auto archive = new TarArchive(std.file.read("my.tar"); foreach(file; archive.files) { writeln("Filename: ", file.path); writeln("Data: ", file.data); }
Writing Usage:
import archive.tar; auto archive = new TarArchive(); auto file = new TarArchive.File("languages/awesome.txt"); file.data = "D\n"; // can also set to immutable(ubyte)[] archive.addFile(file); std.file.write("lang.tar", cast(ubyte[])archive.serialize());
Copyright Richard W Laughlin Jr. 2014—2016
Functions and types that implement the TarPolicy used with the Archive template.