8 #ifndef CVMFS_DIRECTORY_ENTRY_H_
9 #define CVMFS_DIRECTORY_ENTRY_H_
11 #include <sys/types.h>
31 namespace swissknife {
38 class DirectoryEntryTestFactory;
40 class MockCatalogManager;
42 class WritableCatalogManager;
44 template <
class CatalogMgrT>
84 static const unsigned int kName = 0x001;
86 static const unsigned int kSize = 0x004;
87 static const unsigned int kMode = 0x008;
88 static const unsigned int kMtime = 0x010;
158 inline std::string
GetFullPath(
const std::string &parent_directory)
const {
159 std::string file_path = parent_directory +
"/";
160 file_path.append(
name().GetChars(),
name().GetLength());
186 memset(&s, 0,
sizeof(s));
194 s.st_size =
static_cast<off_t
>(
size());
196 s.st_blocks =
static_cast<blkcnt_t
>(1 +
size() / 512);
208 return !(*
this == other);
309 return !(*
this == other);
377 #endif // CVMFS_DIRECTORY_ENTRY_H_
uint32_t linkcount() const
static const unsigned int kHardlinkGroup
bool IsExternalFile() const
void set_is_bind_mountpoint(const bool val)
DirectoryEntry(SpecialDirents special_type)
Differences CompareTo(const DirectoryEntry &other) const
BigVector< StatEntry > StatEntryList
static const unsigned int kHiddenFlag
void set_is_chunked_file(const bool val)
void set_inode(const inode_t inode)
static const unsigned int kChecksum
bool IsChunkedFile() const
SpecialDirents GetSpecial() const
void set_linkcount(const uint32_t linkcount)
void set_is_nested_catalog_root(const bool val)
void set_symlink(const LinkString &symlink)
static const unsigned int kDirectIoFlag
assert((mem||(size==0))&&"Out Of Memory")
shash::Any checksum() const
unsigned int mode() const
bool IsNestedCatalogMountpoint() const
bool IsNestedCatalogRoot() const
std::vector< DirectoryEntry > DirectoryEntryList
zlib::Algorithms compression_algorithm_
static const unsigned int kExternalFileFlag
friend class DirectoryEntryTestFactory
static const unsigned int kHasXattrsFlag
static const unsigned int kName
bool is_nested_catalog_mountpoint_
zlib::Algorithms compression_algorithm() const
void set_has_xattrs(const bool has_xattrs)
Differences CompareTo(const DirectoryEntryBase &other) const
bool operator!=(const DirectoryEntry &other) const
LinkString symlink() const
static const unsigned int kNestedCatalogTransitionFlags
static const unsigned int kLinkcount
static const inode_t kInvalidInode
static const unsigned int kMtime
bool IsBindMountpoint() const
shash::Algorithms hash_algorithm() const
DirectoryEntry(const DirectoryEntryBase &base)
void set_is_hidden(const bool val)
StatEntry(const NameString &n, const struct stat &i)
static const unsigned int kChunkedFileFlag
void set_hardlink_group(const uint32_t group)
static const unsigned int kSymlink
bool operator==(const DirectoryEntryBase &other) const
static const unsigned int kSize
std::string GetFullPath(const std::string &parent_directory) const
bool operator==(const DirectoryEntry &other) const
std::vector< DirectoryEntryBase > DirectoryEntryBaseList
unsigned GetLength() const
static const unsigned int kMode
bool operator!=(const DirectoryEntryBase &other) const
static const unsigned int kBindMountpointFlag
bool is_nested_catalog_root_
uint32_t hardlink_group() const
static const unsigned int kIdentical
void set_is_nested_catalog_mountpoint(const bool val)
struct stat GetStatStructure() const
const shash::Any * checksum_ptr() const