CernVM-FS
2.12.0
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
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
12
catalog::DirectoryEntryBase
SyncItemDummyDir::CreateBasicCatalogDirent
(
13
bool
/* enable_mtime_ns */
)
const
14
{
15
catalog::DirectoryEntryBase
dirent;
16
17
dirent.
inode_
=
catalog::DirectoryEntry::kInvalidInode
;
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
();
29
dirent.
compression_algorithm_
= this->
GetCompressionAlgorithm
();
30
31
dirent.
name_
.
Assign
(this->
filename
().data(), this->
filename
().length());
32
33
assert
(dirent.
IsDirectory
());
34
35
return
dirent;
36
}
37
38
39
SyncItemType
SyncItemDummyDir::GetScratchFiletype
()
const
{
40
return
kItemDir
;
41
}
42
43
}
// namespace publish
catalog::DirectoryEntryBase::IsDirectory
bool IsDirectory() const
Definition:
directory_entry.h:125
publish::SyncItem::GetContentHash
shash::Any GetContentHash() const
Definition:
sync_item.h:121
catalog::DirectoryEntryBase::inode_
inode_t inode_
Definition:
directory_entry.h:230
ShortString::Assign
void Assign(const char *chars, const unsigned length)
Definition:
shortstring.h:61
catalog::DirectoryEntryBase::gid_
gid_t gid_
Definition:
directory_entry.h:236
publish::SyncItemDummyDir::GetScratchFiletype
SyncItemType GetScratchFiletype() const
Definition:
sync_item_dummy.cc:39
assert
assert((mem||(size==0))&&"Out Of Memory")
publish::kItemDir
Definition:
sync_item.h:30
publish::SyncItemDummyDir::CreateBasicCatalogDirent
virtual catalog::DirectoryEntryBase CreateBasicCatalogDirent(bool enable_mtime_ns) const
Definition:
sync_item_dummy.cc:12
publish::SyncItemDummyDir::kPermision
static const mode_t kPermision
Definition:
sync_item_dummy.h:109
catalog::DirectoryEntryBase::size_
uint64_t size_
Definition:
directory_entry.h:237
catalog::DirectoryEntryBase::name_
NameString name_
Definition:
directory_entry.h:233
publish::SyncItem::EntryStat::stat
platform_stat64 stat
Definition:
sync_item.h:265
catalog::DirectoryEntryBase::compression_algorithm_
zlib::Algorithms compression_algorithm_
Definition:
directory_entry.h:257
sync_item_dummy.h
catalog::DirectoryEntryBase::linkcount_
uint32_t linkcount_
Definition:
directory_entry.h:242
catalog::DirectoryEntryBase::is_external_file_
bool is_external_file_
Definition:
directory_entry.h:253
publish::SyncItem::GetCompressionAlgorithm
zlib::Algorithms GetCompressionAlgorithm() const
Definition:
sync_item.h:127
catalog::DirectoryEntryBase
Definition:
directory_entry.h:59
catalog::DirectoryEntryBase::mtime_
time_t mtime_
Definition:
directory_entry.h:238
catalog::DirectoryEntryBase::kInvalidInode
static const inode_t kInvalidInode
Definition:
directory_entry.h:76
publish::SyncItem::scratch_stat_
EntryStat scratch_stat_
Definition:
sync_item.h:275
catalog::DirectoryEntryBase::mode_
unsigned int mode_
Definition:
directory_entry.h:234
publish::SyncItemType
SyncItemType
Definition:
sync_item.h:29
catalog::DirectoryEntryBase::checksum_
shash::Any checksum_
Definition:
directory_entry.h:251
publish::SyncItem::filename
std::string filename() const
Definition:
sync_item.h:180
publish::SyncItem::IsExternalData
bool IsExternalData() const
Definition:
sync_item.h:81
catalog::DirectoryEntryBase::uid_
uid_t uid_
Definition:
directory_entry.h:235
cvmfs
cvmfs
sync_item_dummy.cc
Generated on Sun Dec 1 2024 01:18:13 for CernVM-FS by
1.8.5