LLVM  8.0.1
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"
Include dependency graph for TarWriter.cpp:

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 89 of file TarWriter.cpp.

References UstarHeader::Checksum, I, and llvm::Intrinsic::memset.

Referenced by writePaxHeader(), and writeUstarHeader().

◆ formatPax()

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

Definition at line 71 of file TarWriter.cpp.

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

Referenced by writePaxHeader().

◆ makeUstarHeader()

static UstarHeader makeUstarHeader ( )
static

Definition at line 57 of file TarWriter.cpp.

References UstarHeader::Magic, llvm::Intrinsic::memcpy, and UstarHeader::Version.

Referenced by writePaxHeader(), and writeUstarHeader().

◆ pad()

static void pad ( raw_fd_ostream OS)
static

◆ splitUstar()

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

◆ 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