#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 51 of file XrdOssCsiConfig.hh.
52 {
53 if (!path || !*path) return false;
54 std::string s(path);
55 simplePath(s);
56
57
59 {
61 {
62 if (
prefix_.length() == s.length())
return true;
63 if (s[
prefix_.length()] ==
'/')
return true;
64 }
65 return false;
66 }
67
68 const size_t haystack = s.length();
69 const size_t needle = suffix_.length();
70 if (haystack >= needle && s.substr(haystack-needle, std::string::npos) == suffix_) return true;
71 return false;
72 }
References prefix_.
◆ makeBaseDirname()
| std::string TagPath::makeBaseDirname |
( |
const char * | path | ) |
|
|
inline |
Definition at line 90 of file XrdOssCsiConfig.hh.
91 {
92 if (!path || !*path ||
prefix_.empty())
return std::string();
93
94 std::string p(path);
95 bool wasabs = false;
96 simplePath(p,&wasabs);
98 if (p.length()>1) ret += p;
99 return ret;
100 }
References prefix_.
◆ makeTagFilename()
| std::string TagPath::makeTagFilename |
( |
const char * | path | ) |
|
|
inline |
Definition at line 124 of file XrdOssCsiConfig.hh.
125 {
126 if (!path || !*path) return std::string();
127 std::string p(path);
128 bool wasabs = false;
129 simplePath(p,&wasabs);
130 if (wasabs)
return prefix_ + p + suffix_;
131 return prefix_.substr(1) + p + suffix_;
132 }
References prefix_.
◆ matchPrefixDir()
| bool TagPath::matchPrefixDir |
( |
const char * | path | ) |
|
|
inline |
Definition at line 106 of file XrdOssCsiConfig.hh.
107 {
108 if (!path || !*path ||
prefix_.empty())
return false;
109
110 std::string p(path);
111 simplePath(p);
112 if (prefixstart_ == p) return true;
113 return false;
114 }
References prefix_.
◆ SetPrefix()
| int TagPath::SetPrefix |
( |
XrdSysError & | Eroute, |
|
|
const std::string & | v ) |
|
inline |
Definition at line 74 of file XrdOssCsiConfig.hh.
75 {
76 if (!v.empty() && v[0] != '/')
77 {
78 Eroute.
Emsg(
"Config",
"prefix must be empty or start with /");
79 return 1;
80 }
82 calcPrefixElements();
84 }
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: