17 size_t p = path.find(
"/pnfs");
19 return (proto ==
"gsidcap") ? proto +
':' + path.substr(p) : path.substr(p);
22 p = path.find_first_not_of(
'/');
25 return proto +
"://" + path.substr(p);
58 if (dc_stage(npath.c_str(), 0,
nullptr) != 0) {
60 ex <<
"Cannot stage in file '" << npath
61 <<
"', error was: " << dc_strerror(dc_errno)
62 <<
" (dc_errno=" << dc_errno <<
")";
63 ex.
addContext(
"Calling DCacheStorageMaker::stagein()");
75 if (dc_access (testpath.c_str (), R_OK) != 0)
81 if (dc_stat64 (testpath.c_str (), &buf) != 0)
93 if (timeout != 0) dc_setOpenTimeout(timeout);
void setTimeout(unsigned int timeout) const
CacheHint cacheHint(void) const
std::unique_ptr< Storage > wrapNonLocalFile(std::unique_ptr< Storage > s, const std::string &proto, const std::string &path, int mode) const
std::unique_ptr< Storage > open(const std::string &proto, const std::string &path, int mode, AuxSettings const &aux) const override
static const StorageFactory * get(void)
ReadHint readHint(void) const
void addContext(std::string const &context)
static std::string normalise(const std::string &proto, const std::string &path)
#define DEFINE_EDM_PLUGIN(factory, type, name)
bool check(const std::string &proto, const std::string &path, const AuxSettings &aux, IOOffset *size=0) const override
void stagein(const std::string &proto, const std::string &path, const AuxSettings &aux) const override