LLVM 22.0.0git
TarWriter.cpp File Reference

Go to the source code of this file.

Classes

struct  UstarHeader

Functions

static UstarHeader makeUstarHeader ()
static std::string formatPax (StringRef Key, StringRef Val)
static void pad (raw_fd_ostream &OS)
static void computeChecksum (UstarHeader &Hdr)
static void writePaxHeader (raw_fd_ostream &OS, StringRef Path)
static bool splitUstar (StringRef Path, StringRef &Prefix, StringRef &Name)
static void writeUstarHeader (raw_fd_ostream &OS, StringRef Prefix, StringRef Name, size_t Size)

Variables

static const int BlockSize = 512

Function Documentation

◆ computeChecksum()

void computeChecksum ( UstarHeader & Hdr)
static

Definition at line 88 of file TarWriter.cpp.

References UstarHeader::Checksum, and I.

Referenced by writePaxHeader(), and writeUstarHeader().

◆ formatPax()

◆ makeUstarHeader()

UstarHeader makeUstarHeader ( )
static

Definition at line 56 of file TarWriter.cpp.

References UstarHeader::Magic, and UstarHeader::Version.

Referenced by writePaxHeader(), and writeUstarHeader().

◆ pad()

void pad ( raw_fd_ostream & OS)
static

◆ splitUstar()

bool splitUstar ( StringRef Path,
StringRef & Prefix,
StringRef & Name )
static

Definition at line 127 of file TarWriter.cpp.

References UstarHeader::Name, and llvm::StringRef::npos.

Referenced by llvm::TarWriter::append().

◆ writePaxHeader()

void writePaxHeader ( raw_fd_ostream & OS,
StringRef Path )
static

◆ writeUstarHeader()

void writeUstarHeader ( raw_fd_ostream & OS,
StringRef Prefix,
StringRef Name,
size_t Size )
static

Variable Documentation

◆ BlockSize