/usr/include/root/TArchiveFile.h is in libroot-io-dev 5.34.14-1build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 | // @(#)root/io:$Id$
// Author: Fons Rademakers 30/6/04
/*************************************************************************
* Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. *
* All rights reserved. *
* *
* For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/
#ifndef ROOT_TArchiveFile
#define ROOT_TArchiveFile
//////////////////////////////////////////////////////////////////////////
// //
// TArchiveFile //
// //
// This is an abstract class that describes an archive file containing //
// multiple sub-files, like a ZIP or TAR archive. //
// //
//////////////////////////////////////////////////////////////////////////
#ifndef ROOT_TObject
#include "TObject.h"
#endif
#ifndef ROOT_TString
#include "TString.h"
#endif
#ifndef ROOT_TDatime
#include "TDatime.h"
#endif
class TFile;
class TArchiveMember;
class TObjArray;
class TArchiveFile : public TObject {
private:
TArchiveFile(const TArchiveFile&); // Not implemented because TArchiveFile can not be copied.
TArchiveFile& operator=(const TArchiveFile&); // Not implemented because TArchiveFile can not be copied.
protected:
TString fArchiveName; // Archive file name
TString fMemberName; // Sub-file name
Int_t fMemberIndex; // Index of sub-file in archive
TFile *fFile; // File stream used to access the archive
TObjArray *fMembers; // Members in this archive
TArchiveMember *fCurMember; // Current archive member
static Bool_t ParseUrl(const char *url, TString &archive, TString &member, TString &type);
public:
TArchiveFile() : fArchiveName(""), fMemberName(""), fMemberIndex(-1), fFile(0), fMembers(0), fCurMember(0) { }
TArchiveFile(const char *archive, const char *member, TFile *file);
virtual ~TArchiveFile();
virtual Int_t OpenArchive() = 0;
virtual Int_t SetCurrentMember() = 0;
virtual Int_t SetMember(const char *member);
virtual Int_t SetMember(Int_t idx);
Long64_t GetMemberFilePosition() const;
TArchiveMember *GetMember() const { return fCurMember; }
TObjArray *GetMembers() const { return fMembers; }
Int_t GetNumberOfMembers() const;
const char *GetArchiveName() const { return fArchiveName; }
const char *GetMemberName() const { return fMemberName; }
Int_t GetMemberIndex() const { return fMemberIndex; }
static TArchiveFile *Open(const char *url, TFile *file);
ClassDef(TArchiveFile,1) //An archive file containing multiple sub-files (like a ZIP archive)
};
class TArchiveMember : public TObject {
friend class TArchiveFile;
protected:
TString fName; // Name of member
TString fComment; // Comment field
TDatime fModTime; // Modification time
Long64_t fPosition; // Byte position in archive
Long64_t fFilePosition; // Byte position in archive where member data starts
Long64_t fCsize; // Compressed size
Long64_t fDsize; // Decompressed size
Bool_t fDirectory; // Flag indicating this is a directory
public:
TArchiveMember();
TArchiveMember(const char *name);
TArchiveMember(const TArchiveMember &member);
TArchiveMember &operator=(const TArchiveMember &rhs);
virtual ~TArchiveMember() { }
const char *GetName() const { return fName; }
const char *GetComment() const { return fComment; }
TDatime GetModTime() const { return fModTime; }
Long64_t GetPosition() const { return fPosition; }
Long64_t GetFilePosition() const { return fFilePosition; }
Long64_t GetCompressedSize() const { return fCsize; }
Long64_t GetDecompressedSize() const { return fDsize; }
Bool_t IsDirectory() const { return fDirectory; }
ClassDef(TArchiveMember,1) //An archive member file
};
#endif
|