CernVM-FS  2.10.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
sync_item_tar.h
Go to the documentation of this file.
1 
5 #ifndef CVMFS_SYNC_ITEM_TAR_H_
6 #define CVMFS_SYNC_ITEM_TAR_H_
7 
8 #include "sync_item.h"
9 
10 #include <string>
11 
12 #include "directory_entry.h"
13 #include "duplex_libarchive.h"
15 #include "platform.h"
16 #include "sync_union_tarball.h"
17 #include "util_concurrency.h"
18 
19 namespace publish {
20 
21 class SyncItemTar : public SyncItem {
22  friend class SyncUnionTarball;
23 
24  public:
26  virtual IngestionSource *CreateIngestionSource() const;
27  virtual void MakePlaceholderDirectory() const { rdonly_type_ = kItemDir; }
28  virtual SyncItemType GetScratchFiletype() const;
29  virtual bool IsType(const SyncItemType expected_type) const;
30  virtual void StatScratch(const bool refresh) const;
31 
32  protected:
33  SyncItemTar(const std::string &relative_parent_path,
34  const std::string &filename, struct archive *archive,
35  struct archive_entry *entry, Signal *read_archive_signal,
36  const SyncUnion *union_engine);
37 
38  private:
39  struct archive *archive_;
40  struct archive_entry *archive_entry_;
43  mutable bool obtained_tar_stat_;
45 };
46 
47 } // namespace publish
48 
49 #endif // CVMFS_SYNC_ITEM_TAR_H_
struct stat64 platform_stat64
SyncItemType rdonly_type_
Definition: sync_item.h:268
platform_stat64 GetStatFromTar() const
struct archive * archive_
Definition: sync_item_tar.h:39
virtual void StatScratch(const bool refresh) const
std::string relative_parent_path() const
Definition: sync_item.h:175
virtual bool IsType(const SyncItemType expected_type) const
SyncItemTar(const std::string &relative_parent_path, const std::string &filename, struct archive *archive, struct archive_entry *entry, Signal *read_archive_signal, const SyncUnion *union_engine)
platform_stat64 tar_stat_
Definition: sync_item_tar.h:42
Signal * read_archive_signal_
Definition: sync_item_tar.h:44
SyncItemType
Definition: sync_item.h:29
struct archive_entry * archive_entry_
Definition: sync_item_tar.h:40
std::string filename() const
Definition: sync_item.h:174
virtual void MakePlaceholderDirectory() const
Definition: sync_item_tar.h:27
virtual IngestionSource * CreateIngestionSource() const
virtual SyncItemType GetScratchFiletype() const
virtual catalog::DirectoryEntryBase CreateBasicCatalogDirent() const