ddn.archive.cpio
ddn.archive.cpio
CPIO archive reader and writer implementing ddn.api.archive.
Supports the SVR4 newc (new ASCII) CPIO format, which is the most widely used variant. The newc format uses 110-byte headers with 8-character hexadecimal ASCII fields.
Copyright
BSD-3-Clause
Module Initializers 1
shared static this
()Types 2
classCpioReader : ArchiveReader
Methods
void setProgressCallback(ArchiveProgressCallback callback)bool contains(string path)void readContent(const EntryInfo entry, ContentSink sink)void extractAll(string destDir)void close()Constructors
this(const(ubyte)[] data, ReadOptions opts)classCpioWriter : ArchiveWriter
Methods
void setOutputSink(ContentSink sink)void setProgressCallback(ArchiveProgressCallback callback)void addDirectory(string path,
FilePermissions perms = FilePermissions.fromOctal(octal!"755"))void addFile(string path, const(ubyte)[] content,
EntryWriteOptions opts = EntryWriteOptions.init)void addFile(string path, scope const(ubyte)[] delegate() source,
ulong size = 0, EntryWriteOptions opts = EntryWriteOptions.init)void addFileFrom(string archivePath, string filesystemPath,
EntryWriteOptions opts = EntryWriteOptions.init)void addSymlink(string path, string target)void addHardlink(string path, string target)void removeEntry(string path)void updateEntry(string path, const(ubyte)[] content,
EntryWriteOptions opts = EntryWriteOptions.init)void setComment(string comment)void finish()void close()Constructors
this(ContentSink sink, WriteOptions opts)Functions 3
fn
ArchiveReader makeCpioReader(const(ubyte)[] data, ReadOptions opts)fn
ArchiveWriter makeCpioWriter(ContentSink sink, WriteOptions opts)fn
ArchiveFormat detectCpioFormat(const(ubyte)[] header)