CMS 3D CMS Logo

TStorageFactorySystem.cc
Go to the documentation of this file.
3 
5 
6 
7 TStorageFactorySystem::TStorageFactorySystem(const char *, Bool_t)
8  : TSystem("-StorageFactory", "Storage Factory System"),
9  fDirp(0)
10 { SetName("StorageFactory"); }
11 
13  : TSystem("-StorageFactory", "Storage Factory System"),
14  fDirp(0)
15 { SetName("StorageFactory"); }
16 
18 {}
19 
23 Int_t
25 {
26  Error("MakeDirectory", "Unsupported");
27  return -1;
28 }
29 
30 void *
32 {
33  Error("OpenDirectory", "Unsupported");
34  return 0;
35 }
36 
37 void
39 {
40  Error("FreeDirectory", "Unsupported");
41 }
42 
43 const char *
45 {
46  Error("GetDirEntry", "Unsupported");
47  return 0;
48 }
49 
50 Bool_t
51 TStorageFactorySystem::AccessPathName(const char *name, EAccessMode /* mode */)
52 {
53  // NB: This return reverse of check(): kTRUE if access *fails*
54  return name ? !StorageFactory::get()->check(name) : kTRUE;
55 }
56 
57 Int_t
58 TStorageFactorySystem::Unlink(const char */*name*/)
59 {
60  Error("Unlink", "Unsupported");
61  return 1;
62 }
63 
64 Int_t
65 TStorageFactorySystem::GetPathInfo(const char *name, FileStat_t &info)
66 {
67  info.fDev = 0;
68  info.fIno = 0;
69  info.fMode = 0644;
70  info.fUid = 0;
71  info.fGid = 0;
72  info.fSize = 0;
73  info.fMtime = 0;
74 
75  IOOffset storageSize;
76  if (StorageFactory::get()->check(name, &storageSize))
77  {
78  info.fSize = storageSize;
79  return 0;
80  }
81 
82  return -1;
83 }
bool check(const std::string &url, IOOffset *size=0) const
virtual const char * GetDirEntry(void *dirp)
virtual void * OpenDirectory(const char *name)
static const TGPicture * info(bool iBackgroundIsBlack)
static const StorageFactory * get(void)
virtual int Unlink(const char *name)
ClassImp(TStorageFactorySystem) TStorageFactorySystem
virtual Int_t GetPathInfo(const char *path, FileStat_t &info)
virtual void FreeDirectory(void *dirp)
int64_t IOOffset
Definition: IOTypes.h:19
virtual Int_t MakeDirectory(const char *name)
virtual Bool_t AccessPathName(const char *path, EAccessMode mode)
def check(config)
Definition: trackerTree.py:14