29#ifndef PT_SYSTEM_TAR_WRITER_H
30#define PT_SYSTEM_TAR_WRITER_H
32#include <Pt/System/Path.h>
33#include <Pt/System/FileInfo.h>
151 std::size_t totalSize,
186 class TarWriterImpl* _impl;
Perms
File permission flags.
Definition FileInfo.h:117
Represents a path in the file-system.
Definition Path.h:48
void addSymlink(const Pt::System::Path &path, const Pt::System::Path &target)
Write a symbolic-link entry.
TarWriter()
Default constructor.
void addDirectory(const Pt::System::Path &path, Pt::System::FileInfo::Perms permissions)
Write a directory entry.
void writeFile(const char *data, std::size_t size)
Write a chunk of data for the current streaming file entry.
void finish()
Write the end-of-archive marker (two 512-byte null blocks).
void attach(std::ostream &os)
Attach to an output stream.
void endFile()
Finish the current streaming file entry started by beginFile().
TarWriter(std::ostream &os)
Constructor attaching to os.
void addFile(const Pt::System::Path &path, const char *data, std::size_t size, Pt::System::FileInfo::Perms permissions)
Write a regular file entry.
void detach()
Detach from the current output stream.
void reset()
Detach from the current output stream and reset state.
void addHardlink(const Pt::System::Path &path, const Pt::System::Path &target)
Write a hard-link entry.
void beginFile(const Pt::System::Path &path, std::size_t totalSize, Pt::System::FileInfo::Perms permissions)
Begin writing a regular file entry for streaming.
System programming
Definition Connection.h:26
Core module.
Definition Allocator.h:33