![]() |
![]() |
Public Member Functions | |
virtual Storage * | open (const std::string &proto, const std::string &path, int mode, const std::string &tmpdir) |
Definition at line 5 of file HttpStorageMaker.cc.
virtual Storage* HttpStorageMaker::open | ( | const std::string & | proto, | |
const std::string & | path, | |||
int | mode, | |||
const std::string & | tmpdir | |||
) | [inline, virtual] |
Implements StorageMaker.
Definition at line 8 of file HttpStorageMaker.cc.
References RemoteFile::get(), RemoteFile::local(), and pyDBSRunClass::temp.
00012 { 00013 std::string temp; 00014 int localfd = RemoteFile::local (tmpdir, temp); 00015 std::string newurl ((proto == "web" ? "https" : proto) + ":" + path); 00016 const char *curlopts [] = { 00017 "curl", "-L", "-f", "-o", temp.c_str(), "-q", "-s", "--url", 00018 newurl.c_str (), 0 00019 }; 00020 00021 return RemoteFile::get (localfd, temp, (char **) curlopts, mode); 00022 }