#include <XrdOssCsiConfig.hh>
Definition at line 41 of file XrdOssCsiConfig.hh.
◆ TagPath()
◆ ~TagPath()
◆ getPrefixName()
std::string TagPath::getPrefixName |
( |
| ) |
|
|
inline |
◆ hasPrefix()
bool TagPath::hasPrefix |
( |
| ) |
|
|
inline |
◆ isTagFile()
bool TagPath::isTagFile |
( |
const char * | path | ) |
|
|
inline |
Definition at line 50 of file XrdOssCsiConfig.hh.
51 {
52 if (!path || !*path) return false;
53 std::string s(path);
54 simplePath(s);
55
57 {
59 {
60 if (
prefix_.length() == s.length())
return true;
61 if (s[
prefix_.length()] ==
'/')
return true;
62 }
63 return false;
64 }
65
66 const size_t haystack = s.length();
67 const size_t needle = suffix_.length();
68 if (haystack >= needle && s.substr(haystack-needle, std::string::npos) == suffix_) return true;
69 return false;
70 }
References prefix_.
◆ makeBaseDirname()
std::string TagPath::makeBaseDirname |
( |
const char * | path | ) |
|
|
inline |
Definition at line 88 of file XrdOssCsiConfig.hh.
89 {
90 if (!path || *path !=
'/' ||
prefix_.empty())
return std::string();
91 std::string p(path);
92 simplePath(p);
93 if (p.length()>1)
return prefix_ + p;
95 }
References prefix_.
◆ makeTagFilename()
std::string TagPath::makeTagFilename |
( |
const char * | path | ) |
|
|
inline |
Definition at line 116 of file XrdOssCsiConfig.hh.
117 {
118 if (!path || *path != '/') return std::string();
119 std::string p(path);
120 simplePath(p);
122 }
References prefix_.
◆ matchPrefixDir()
bool TagPath::matchPrefixDir |
( |
const char * | path | ) |
|
|
inline |
Definition at line 100 of file XrdOssCsiConfig.hh.
101 {
102 if (!path || *path !=
'/' ||
prefix_.empty())
return false;
103 std::string p(path);
104 simplePath(p);
105 if (prefixstart_ == p) return true;
106 return false;
107 }
References prefix_.
◆ SetPrefix()
int TagPath::SetPrefix |
( |
XrdSysError & | Eroute, |
|
|
const std::string & | v ) |
|
inline |
Definition at line 72 of file XrdOssCsiConfig.hh.
73 {
74 if (!v.empty() && v[0] != '/')
75 {
76 Eroute.
Emsg(
"Config",
"prefix must be empty or start with /");
77 return 1;
78 }
80 calcPrefixElements();
82 }
int Emsg(const char *esfx, int ecode, const char *text1, const char *text2=0)
References XrdSysError::Emsg(), prefix_, and XrdOssOK.
◆ prefix_
std::string TagPath::prefix_ |
The documentation for this class was generated from the following file: