CernVM-FS  2.12.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
sync_item_dummy.cc
Go to the documentation of this file.
1 
5 #include "sync_item_dummy.h"
6 
7 #include <cassert>
8 #include <ctime>
9 
10 namespace publish {
11 
13  bool /* enable_mtime_ns */) const
14 {
16 
18 
19  dirent.linkcount_ = 1;
20 
21  dirent.mode_ = kPermision;
22 
23  dirent.uid_ = scratch_stat_.stat.st_uid;
24  dirent.gid_ = scratch_stat_.stat.st_gid;
25  dirent.size_ = 4096;
26  dirent.mtime_ = time(NULL);
27  dirent.checksum_ = this->GetContentHash();
28  dirent.is_external_file_ = this->IsExternalData();
30 
31  dirent.name_.Assign(this->filename().data(), this->filename().length());
32 
33  assert(dirent.IsDirectory());
34 
35  return dirent;
36 }
37 
38 
40  return kItemDir;
41 }
42 
43 } // namespace publish
bool IsDirectory() const
shash::Any GetContentHash() const
Definition: sync_item.h:121
inode_t inode_
void Assign(const char *chars, const unsigned length)
Definition: shortstring.h:61
gid_t gid_
SyncItemType GetScratchFiletype() const
assert((mem||(size==0))&&"Out Of Memory")
virtual catalog::DirectoryEntryBase CreateBasicCatalogDirent(bool enable_mtime_ns) const
static const mode_t kPermision
uint64_t size_
NameString name_
platform_stat64 stat
Definition: sync_item.h:265
zlib::Algorithms compression_algorithm_
uint32_t linkcount_
bool is_external_file_
zlib::Algorithms GetCompressionAlgorithm() const
Definition: sync_item.h:127
time_t mtime_
static const inode_t kInvalidInode
EntryStat scratch_stat_
Definition: sync_item.h:275
unsigned int mode_
SyncItemType
Definition: sync_item.h:29
shash::Any checksum_
std::string filename() const
Definition: sync_item.h:180
bool IsExternalData() const
Definition: sync_item.h:81
uid_t uid_