48extern const std::string
VERSION;
52#define ENVPFX "Davix."
69 SetTitle(
"WebDAV system administration");
79 SetTitle(
"WebDAV system administration");
93 d_ptr->davixPosix->closedir(
static_cast<DAVIX_DIR *
>(dirp), NULL);
94 d_ptr->removeDird(dirp);
102 DavixError *davixErr = NULL;
103 if (((dir =
d_ptr->davixPosix->readdir(
static_cast<DAVIX_DIR *
>(dirp), &davixErr)) == NULL)
104 && (davixErr != NULL)) {
105 Error(
"DavixReaddir",
"failed to readdir the directory: %s (%d)",
106 davixErr->getErrMsg().c_str(), davixErr->getStatus());
107 DavixError::clearError(&davixErr);
109 return (dir) ? (dir->d_name) : NULL;
116 DavixError *davixErr = NULL;
118 if ((
d =
d_ptr->davixPosix->opendir(
d_ptr->davixParam, dir, &davixErr)) == NULL) {
119 Error(
"DavixOpendir",
"failed to opendir the directory: %s (%d)",
120 davixErr->getErrMsg().c_str(), davixErr->getStatus());
121 DavixError::clearError(&davixErr);
141 if (!
d_ptr->DavixStat(path, &st))
return 1;
144 buf.
fMode = st.st_mode;
146 buf.
fUid = st.st_uid;
147 buf.
fGid = st.st_gid;
148 buf.
fSize = st.st_size;
168 DavixError *davixErr = NULL;
171 DavFile
f(*
d_ptr->davixContext, Uri(path));
172 if ((
ret =
f.getAllReplicas(
d_ptr->davixParam,
175 Error(
"DavixLocate",
"failed to Locate file: %s (%d)",
176 davixErr->getErrMsg().c_str(), davixErr->getStatus());
177 DavixError::clearError(&davixErr);
180 if (vecRep.size() > 0) {
181 endurl = vecRep[0].uri.getString().c_str();
186 Info(
"DavixLocate",
"Davix Locate %s to %s", path, endurl.
Data());
195 DavixError *davixErr = NULL;
197 if ((
ret =
d_ptr->davixPosix->mkdir(
d_ptr->davixParam, dir, 0755, &davixErr)) < 0) {
198 Error(
"DavixMkdir",
"failed to create the directory: %s (%d)",
199 davixErr->getErrMsg().c_str(), davixErr->getStatus());
200 DavixError::clearError(&davixErr);
209 DavixError *davixErr = NULL;
211 if ((
ret =
d_ptr->davixPosix->unlink(
d_ptr->davixParam, path, &davixErr)) < 0) {
212 Error(
"DavixUnlink",
"failed to unlink the file: %s (%d)",
213 davixErr->getErrMsg().c_str(), davixErr->getStatus());
214 DavixError::clearError(&davixErr);
int Int_t
Signed integer 4 bytes (int).
bool Bool_t
Boolean (0=false, 1=true) (bool).
const char * s3_seckey_opt
static const std::string VERSION
const char * ca_check_opt
const char * s3_acckey_opt
const char * grid_mode_opt
static const std::string gUserAgent
Bool_t ConsistentWith(const char *path, void *dirptr) override
Check consistency of this helper with the one required by 'path' or 'dirptr'.
Int_t MakeDirectory(const char *dir) override
Make a directory.
void FreeDirectory(void *dirp) override
Free a directory.
virtual Int_t Locate(const char *path, TString &endurl)
const char * GetDirEntry(void *dirp) override
Get a directory entry. Returns 0 if no more entries.
TDavixFileInternal * d_ptr
Bool_t IsPathLocal(const char *path) override
Returns TRUE if the url in 'path' points to the local file system.
Int_t GetPathInfo(const char *path, FileStat_t &buf) override
Get info about a file.
int Unlink(const char *path) override
Unlink, i.e.
void * OpenDirectory(const char *dir) override
Open a directory.
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
virtual void Info(const char *method, const char *msgfmt,...) const
Issue info message.
const char * Data() const
TSystem(const TSystem &)=delete