Public Member Functions | |
virtual Storage * | open (const std::string &proto, const std::string &path, int mode) |
Definition at line 6 of file GsiFTPStorageMaker.cc.
virtual Storage* GsiFTPStorageMaker::open | ( | const std::string & | proto, |
const std::string & | path, | ||
int | mode | ||
) | [inline, virtual] |
Implements StorageMaker.
Definition at line 9 of file GsiFTPStorageMaker.cc.
References f, reco::get(), RemoteFile::local(), groupFilesInBlocks::temp, and StorageFactory::tempDir().
{ std::string temp; StorageFactory *f = StorageFactory::get(); int localfd = RemoteFile::local (f->tempDir(), temp); std::string lurl = "file://" + temp; std::string newurl ((proto == "sfn" ? "gsiftp" : proto) + ":" + path); const char *ftpopts [] = { "globus-url-copy", newurl.c_str (), lurl.c_str (), 0 }; return RemoteFile::get (localfd, temp, (char **) ftpopts, mode); }