CMS 3D CMS Logo

TStorageFactorySystem.cc
Go to the documentation of this file.
3 
5 
6 using namespace edm::storage;
7 
9  : TSystem("-StorageFactory", "Storage Factory System"), fDirp(nullptr) {
10  SetName("StorageFactory");
11 }
12 
14  : TSystem("-StorageFactory", "Storage Factory System"), fDirp(nullptr) {
15  SetName("StorageFactory");
16 }
17 
19 
23 Int_t TStorageFactorySystem::MakeDirectory(const char * /*name*/) {
24  Error("MakeDirectory", "Unsupported");
25  return -1;
26 }
27 
28 void *TStorageFactorySystem::OpenDirectory(const char * /*name*/) {
29  Error("OpenDirectory", "Unsupported");
30  return nullptr;
31 }
32 
33 void TStorageFactorySystem::FreeDirectory(void * /*dirp*/) { Error("FreeDirectory", "Unsupported"); }
34 
35 const char *TStorageFactorySystem::GetDirEntry(void * /*dirp*/) {
36  Error("GetDirEntry", "Unsupported");
37  return nullptr;
38 }
39 
40 Bool_t TStorageFactorySystem::AccessPathName(const char *name, EAccessMode /* mode */) {
41  // NB: This return reverse of check(): kTRUE if access *fails*
42  return name ? !StorageFactory::get()->check(name) : kTRUE;
43 }
44 
45 Int_t TStorageFactorySystem::Unlink(const char * /*name*/) {
46  Error("Unlink", "Unsupported");
47  return 1;
48 }
49 
50 Int_t TStorageFactorySystem::GetPathInfo(const char *name, FileStat_t &info) {
51  info.fDev = 0;
52  info.fIno = 0;
53  info.fMode = 0644;
54  info.fUid = 0;
55  info.fGid = 0;
56  info.fSize = 0;
57  info.fMtime = 0;
58 
59  IOOffset storageSize;
60  if (StorageFactory::get()->check(name, &storageSize)) {
61  info.fSize = storageSize;
62  return 0;
63  }
64 
65  return -1;
66 }
edm::ErrorSummaryEntry Error
int64_t IOOffset
Definition: IOTypes.h:20
Int_t GetPathInfo(const char *path, FileStat_t &info) override
static const TGPicture * info(bool iBackgroundIsBlack)
void * OpenDirectory(const char *name) override
int Unlink(const char *name) override
const char * GetDirEntry(void *dirp) override
~TStorageFactorySystem(void) override
#define get
Int_t MakeDirectory(const char *name) override
void FreeDirectory(void *dirp) override
Bool_t AccessPathName(const char *path, EAccessMode mode) override
ClassImp(TStorageFactorySystem)