XRootD
Loading...
Searching...
No Matches
XrdOssArc.hh
Go to the documentation of this file.
1#ifndef _XRDOSSARC_H
2#define _XRDOSSARC_H
3/******************************************************************************/
4/* */
5/* X r d O s s A r c . h h */
6/* */
7/* (c) 2023 by the Board of Trustees of the Leland Stanford, Jr., University */
8/* All Rights Reserved */
9/* Produced by Andrew Hanushevsky for Stanford University under contract */
10/* DE-AC02-76-SFO0515 with the Department of Energy */
11/* */
12/* This file is part of the XRootD software suite. */
13/* */
14/* XRootD is free software: you can redistribute it and/or modify it under */
15/* the terms of the GNU Lesser General Public License as published by the */
16/* Free Software Foundation, either version 3 of the License, or (at your */
17/* option) any later version. */
18/* */
19/* XRootD is distributed in the hope that it will be useful, but WITHOUT */
20/* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or */
21/* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public */
22/* License for more details. */
23/* */
24/* You should have received a copy of the GNU Lesser General Public License */
25/* along with XRootD in a file called COPYING.LESSER (LGPL license) and file */
26/* COPYING (GPL license). If not, see <http://www.gnu.org/licenses/>. */
27/* */
28/* The copyright holder's institutional names and contributor's names may not */
29/* be used to endorse or promote products derived from this software without */
30/* specific prior written permission of the institution or contributor. */
31/******************************************************************************/
32
36
37class XrdOucEnv;
38
40{
41public:
42
43//-----------------------------------------------------------------------------
50//-----------------------------------------------------------------------------
51
52virtual XrdOssDF *newDir(const char *tident) override
53 {return new XrdOssArcDir(tident,wrapPI.newDir(tident));}
54
55//-----------------------------------------------------------------------------
62//-----------------------------------------------------------------------------
63
64virtual XrdOssDF *newFile(const char *tident) override
65 {return new XrdOssArcFile(tident,wrapPI.newFile(tident));}
66
67//-----------------------------------------------------------------------------
75//-----------------------------------------------------------------------------
76
77virtual int Chmod(const char * path, mode_t mode, XrdOucEnv *envP=0)
78 override;
79
80//-----------------------------------------------------------------------------
93//-----------------------------------------------------------------------------
94
95virtual int Create(const char* tid, const char* path, mode_t mode,
96 XrdOucEnv& env, int opts=0) override;
97
98//-----------------------------------------------------------------------------
102//-----------------------------------------------------------------------------
103
104virtual uint64_t Features() override;
105
106//-----------------------------------------------------------------------------
116//-----------------------------------------------------------------------------
117
118virtual int FSctl(int cmd, int alen, const char *args, char **resp=0)
119 override;
120
121//-----------------------------------------------------------------------------
132//-----------------------------------------------------------------------------
133
134virtual bool getErrMsg(std::string& eText) override;
135
136//-----------------------------------------------------------------------------
144//-----------------------------------------------------------------------------
145
146virtual int Lfn2Pfn(const char *Path, char *buff, int blen) override;
147
148//-----------------------------------------------------------------------------
158//-----------------------------------------------------------------------------
159virtual
160const char *Lfn2Pfn(const char *Path, char *buff, int blen, int &rc)
161 override;
162
163//-----------------------------------------------------------------------------
172//-----------------------------------------------------------------------------
173
174virtual int Mkdir(const char *path, mode_t mode, int mkpath=0,
175 XrdOucEnv *envP=0) override;
176
177//-----------------------------------------------------------------------------
187//-----------------------------------------------------------------------------
188
189virtual int Remdir(const char *path, int Opts=0, XrdOucEnv *envP=0)
190 override;
191
192//-----------------------------------------------------------------------------
201//-----------------------------------------------------------------------------
202
203virtual int Rename(const char *oPath, const char *nPath,
204 XrdOucEnv *oEnvP=0, XrdOucEnv *nEnvP=0) override;
205
206
207//-----------------------------------------------------------------------------
219//-----------------------------------------------------------------------------
220
221virtual int Stat(const char *path, struct stat *buff,
222 int opts=0, XrdOucEnv *envP=0) override;
223
224//-----------------------------------------------------------------------------
232//-----------------------------------------------------------------------------
233
234virtual int Truncate(const char *path, unsigned long long fsize,
235 XrdOucEnv *envP=0) override;
236
237//-----------------------------------------------------------------------------
248//-----------------------------------------------------------------------------
249
250virtual int Unlink(const char *path, int Opts=0, XrdOucEnv *envP=0)
251 override;
252
253 XrdOssArc(XrdOss& ossref) :XrdOssWrapper(ossref) {}
254
255virtual ~XrdOssArc() {}
256
257// This is used to initialize the object from an extern "C" function.
258//
259int InitArc(const char*, const char *parms, XrdOucEnv* envP);
260};
261#endif
#define tident
struct stat Stat
Definition XrdCks.cc:49
#define stat(a, b)
Definition XrdPosix.hh:101
XrdOucString Path
bool Create
struct myOpts opts
virtual int Chmod(const char *path, mode_t mode, XrdOucEnv *envP=0) override
Definition XrdOssArc.cc:124
virtual int Remdir(const char *path, int Opts=0, XrdOucEnv *envP=0) override
Definition XrdOssArc.cc:296
XrdOssArc(XrdOss &ossref)
Definition XrdOssArc.hh:253
virtual int Rename(const char *oPath, const char *nPath, XrdOucEnv *oEnvP=0, XrdOucEnv *nEnvP=0) override
Definition XrdOssArc.cc:315
virtual XrdOssDF * newDir(const char *tident) override
Definition XrdOssArc.hh:52
virtual bool getErrMsg(std::string &eText) override
Definition XrdOssArc.cc:183
virtual XrdOssDF * newFile(const char *tident) override
Definition XrdOssArc.hh:64
virtual int Mkdir(const char *path, mode_t mode, int mkpath=0, XrdOucEnv *envP=0) override
Definition XrdOssArc.cc:277
virtual int Truncate(const char *path, unsigned long long fsize, XrdOucEnv *envP=0) override
Definition XrdOssArc.cc:383
virtual int Lfn2Pfn(const char *Path, char *buff, int blen) override
Definition XrdOssArc.cc:239
virtual uint64_t Features() override
Definition XrdOssArc.cc:163
virtual int FSctl(int cmd, int alen, const char *args, char **resp=0) override
Definition XrdOssArc.cc:172
int InitArc(const char *, const char *parms, XrdOucEnv *envP)
Definition XrdOssArc.cc:205
virtual int Unlink(const char *path, int Opts=0, XrdOucEnv *envP=0) override
Definition XrdOssArc.cc:403
virtual ~XrdOssArc()
Definition XrdOssArc.hh:255
XrdOssWrapper(XrdOss &ossRef)
XrdOss()
Constructor and Destructor.
Definition XrdOss.hh:978