CernVM-FS  2.12.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
directory_entry.cc
Go to the documentation of this file.
1 
5 #include "directory_entry.h"
6 
7 namespace catalog {
8 
10  const DirectoryEntryBase &other) const
11 {
13 
14  if (name() != other.name()) {
15  result |= Difference::kName;
16  }
17  if (linkcount() != other.linkcount()) {
18  result |= Difference::kLinkcount;
19  }
20  if (size() != other.size()) {
21  result |= Difference::kSize;
22  }
23  if (mode() != other.mode()) {
24  result |= Difference::kMode;
25  }
26  if ((mtime() != other.mtime()) || (mtime_ns() != other.mtime_ns())) {
27  result |= Difference::kMtime;
28  }
29  if (symlink() != other.symlink()) {
30  result |= Difference::kSymlink;
31  }
32  if (checksum() != other.checksum()) {
33  result |= Difference::kChecksum;
34  }
35  if (HasXattrs() != other.HasXattrs()) {
37  }
38  if (uid() != other.uid()) {
39  result |= Difference::kUid;
40  }
41  if (gid() != other.gid()) {
42  result |= Difference::kGid;
43  }
44 
45  return result;
46 }
47 
49  const DirectoryEntry &other) const
50 {
52 
53  if (hardlink_group() != other.hardlink_group()) {
55  }
56  if ( (IsNestedCatalogRoot() != other.IsNestedCatalogRoot()) ||
59  }
60  if (IsChunkedFile() != other.IsChunkedFile()) {
62  }
63  if (IsExternalFile() != other.IsExternalFile()) {
65  }
66  if (IsBindMountpoint() != other.IsBindMountpoint()) {
68  }
69  if (IsHidden() != other.IsHidden()) {
70  result |= Difference::kHiddenFlag;
71  }
72  if (IsDirectIo() != other.IsDirectIo()) {
73  result |= Difference::kDirectIoFlag;
74  }
75 
76  return result;
77 }
78 
79 } // namespace catalog
uint32_t linkcount() const
static const unsigned int kHardlinkGroup
bool IsExternalFile() const
Differences CompareTo(const DirectoryEntry &other) const
static const unsigned int kHiddenFlag
time_t mtime() const
static const unsigned int kChecksum
bool IsHidden() const
bool IsChunkedFile() const
uint64_t size() const
static const unsigned int kGid
static const unsigned int kDirectIoFlag
bool IsDirectIo() const
shash::Any checksum() const
unsigned int mode() const
bool IsNestedCatalogMountpoint() const
bool IsNestedCatalogRoot() const
NameString name() const
static const unsigned int kExternalFileFlag
bool HasXattrs() const
static const unsigned int kHasXattrsFlag
static const unsigned int kName
Differences CompareTo(const DirectoryEntryBase &other) const
LinkString symlink() const
static const unsigned int kNestedCatalogTransitionFlags
static const unsigned int kLinkcount
static const unsigned int kMtime
bool IsBindMountpoint() const
static const unsigned int kChunkedFileFlag
static const unsigned int kSymlink
static const unsigned int kSize
uid_t uid() const
gid_t gid() const
static const unsigned int kMode
static const unsigned int kBindMountpointFlag
int32_t mtime_ns() const
uint32_t hardlink_group() const
static const unsigned int kIdentical
unsigned int Differences
static const unsigned int kUid