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);
54 if (dc_stage(npath.c_str(), 0, 0) != 0) {
56 ex <<
"Cannot stage in file '" << npath
57 <<
"', error was: " << dc_strerror(dc_errno)
58 <<
" (dc_errno=" << dc_errno <<
")";
59 ex.
addContext(
"Calling DCacheStorageMaker::stagein()");
69 if (dc_access (testpath.c_str (), R_OK) != 0)
75 if (dc_stat64 (testpath.c_str (), &buf) != 0)
85 if (timeout != 0) dc_setOpenTimeout(timeout);
virtual void stagein(const std::string &proto, const std::string &path) override
CacheHint cacheHint(void) const
virtual bool check(const std::string &proto, const std::string &path, IOOffset *size=0) override
virtual Storage * open(const std::string &proto, const std::string &path, int mode) override
Storage * wrapNonLocalFile(Storage *s, const std::string &proto, const std::string &path, int mode)
static StorageFactory * get(void)
tuple path
else: Piece not in the list, fine.
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)
tuple size
Write out results.
virtual void setTimeout(unsigned int timeout) override