LLVM 20.0.0git
Classes | Functions | Variables
TarWriter.cpp File Reference
#include "llvm/Support/TarWriter.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/Support/Path.h"

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()

static void computeChecksum ( UstarHeader Hdr)
static

Definition at line 88 of file TarWriter.cpp.

References UstarHeader::Checksum, and I.

Referenced by writePaxHeader(), and writeUstarHeader().

◆ formatPax()

static std::string formatPax ( StringRef  Key,
StringRef  Val 
)
static

Definition at line 70 of file TarWriter.cpp.

References llvm::StringRef::size(), llvm::Twine::str(), and llvm::Total.

Referenced by writePaxHeader().

◆ makeUstarHeader()

static UstarHeader makeUstarHeader ( )
static

Definition at line 56 of file TarWriter.cpp.

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

Referenced by writePaxHeader(), and writeUstarHeader().

◆ pad()

static void pad ( raw_fd_ostream OS)
static

Definition at line 82 of file TarWriter.cpp.

References llvm::alignTo(), BlockSize, OS, and llvm::raw_ostream::tell().

Referenced by llvm::TarWriter::append(), and writePaxHeader().

◆ splitUstar()

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

Definition at line 127 of file TarWriter.cpp.

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

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

◆ writePaxHeader()

static void writePaxHeader ( raw_fd_ostream OS,
StringRef  Path 
)
static

◆ writeUstarHeader()

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

Variable Documentation

◆ BlockSize

const int BlockSize = 512
static