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) |
virtual void | stagein (const std::string &proto, const std::string &path) |
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 32 of file XrdStorageMaker.cc.
References flags, ExpressReco_HICollisions_FallBack::id, and findQualityFiles::size.
{ std::string fullpath(proto + ":" + path); XrdClientAdmin admin(fullpath.c_str()); if (! admin.Connect()) return false; // FIXME: Throw? long id; long flags; long modtime; long long xrdsize; XrdOucString str(fullpath.c_str()); XrdClientUrlSet url(str); if (! admin.Stat(url.GetFile().c_str(), id, xrdsize, flags, modtime)) return false; // FIXME: Throw? *size = xrdsize; return true; }
virtual Storage* XrdStorageMaker::open | ( | const std::string & | proto, |
const std::string & | path, | ||
int | mode | ||
) | [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.
virtual void XrdStorageMaker::stagein | ( | const std::string & | proto, |
const std::string & | path | ||
) | [inline, virtual] |
Reimplemented from StorageMaker.
Definition at line 20 of file XrdStorageMaker.cc.
{ std::string fullpath(proto + ":" + path); XrdClientAdmin admin(fullpath.c_str()); if (admin.Connect()) { XrdOucString str(fullpath.c_str()); XrdClientUrlSet url(str); admin.Prepare(url.GetFile().c_str(), kXR_stage | kXR_noerrs, 0); } }