Line |
Branch |
Exec |
Source |
1 |
|
|
/** |
2 |
|
|
* This file is part of the CernVM File System |
3 |
|
|
*/ |
4 |
|
|
|
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 |
44 |
|
|
|