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;
194 #endif // include guard
Core module.
Definition: Allocator.h:33
void endFile()
Finish the current streaming file entry started by beginFile().
void attach(std::ostream &os)
Attach to an output stream.
void addSymlink(const Pt::System::Path &path, const Pt::System::Path &target)
Write a symbolic-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.
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 addFile(const Pt::System::Path &path, const char *data, std::size_t size, Pt::System::FileInfo::Perms permissions)
Write a regular file entry.
void addDirectory(const Pt::System::Path &path, Pt::System::FileInfo::Perms permissions)
Write a directory entry.
TarWriter()
Default constructor.
Blocking writer for tar archives (Pax/UStar format).
Definition: TarWriter.h:78
Perms
File permission flags.
Definition: FileInfo.h:117
void detach()
Detach from the current output stream.
void writeFile(const char *data, std::size_t size)
Write a chunk of data for the current streaming file entry.
Represents a path in the file-system.
Definition: Path.h:48
void finish()
Write the end-of-archive marker (two 512-byte null blocks).
TarWriter(std::ostream &os)
Constructor attaching to os.