![]() |
![]() |
Public Member Functions | |
virtual bool | check (const std::string &proto, const std::string &path, IOOffset *size=0) |
virtual Storage * | open (const std::string &proto, const std::string &path, int mode, const std::string &tmpdir) |
Open a storage object for the given URL (protocol + path), using the mode bits. |
Definition at line 7 of file XrdStorageMaker.cc.
virtual bool XrdStorageMaker::check | ( | const std::string & | proto, | |
const std::string & | path, | |||
IOOffset * | size = 0 | |||
) | [inline, virtual] |
Reimplemented from StorageMaker.
Definition at line 21 of file XrdStorageMaker.cc.
References flags, id, and size.
00024 { 00025 std::string fullpath(proto + ":" + path); 00026 XrdClientAdmin admin(fullpath.c_str()); 00027 if (! admin.Connect()) 00028 return false; // FIXME: Throw? 00029 00030 long id; 00031 long flags; 00032 long modtime; 00033 long long xrdsize; 00034 00035 XrdOucString str(fullpath.c_str()); 00036 XrdClientUrlSet url(str); 00037 00038 if (! admin.Stat(url.GetFile().c_str(), id, xrdsize, flags, modtime)) 00039 return false; // FIXME: Throw? 00040 00041 *size = xrdsize; 00042 return true; 00043 }
virtual Storage* XrdStorageMaker::open | ( | const std::string & | proto, | |
const std::string & | path, | |||
int | mode, | |||
const std::string & | tmpdir | |||
) | [inline, virtual] |
Open a storage object for the given URL (protocol + path), using the mode bits.
No temporary files are downloaded.
Implements StorageMaker.
Definition at line 12 of file XrdStorageMaker.cc.
00016 { 00017 std::string fullpath(proto + ":" + path); 00018 return new XrdFile (fullpath, mode); 00019 }