| 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 |
|
✗ |
catalog::DirectoryEntryBase dirent; |
| 15 |
|
|
|
| 16 |
|
✗ |
dirent.inode_ = catalog::DirectoryEntry::kInvalidInode; |
| 17 |
|
|
|
| 18 |
|
✗ |
dirent.linkcount_ = 1; |
| 19 |
|
|
|
| 20 |
|
✗ |
dirent.mode_ = kPermision; |
| 21 |
|
|
|
| 22 |
|
✗ |
dirent.uid_ = scratch_stat_.stat.st_uid; |
| 23 |
|
✗ |
dirent.gid_ = scratch_stat_.stat.st_gid; |
| 24 |
|
✗ |
dirent.size_ = 4096; |
| 25 |
|
✗ |
dirent.mtime_ = time(NULL); |
| 26 |
|
✗ |
dirent.checksum_ = this->GetContentHash(); |
| 27 |
|
✗ |
dirent.is_external_file_ = this->IsExternalData(); |
| 28 |
|
✗ |
dirent.compression_algorithm_ = this->GetCompressionAlgorithm(); |
| 29 |
|
|
|
| 30 |
|
✗ |
dirent.name_.Assign(this->filename().data(), this->filename().length()); |
| 31 |
|
|
|
| 32 |
|
✗ |
assert(dirent.IsDirectory()); |
| 33 |
|
|
|
| 34 |
|
✗ |
return dirent; |
| 35 |
|
|
} |
| 36 |
|
|
|
| 37 |
|
|
|
| 38 |
|
✗ |
SyncItemType SyncItemDummyDir::GetScratchFiletype() const { return kItemDir; } |
| 39 |
|
|
|
| 40 |
|
|
} // namespace publish |
| 41 |
|
|
|