xrootd
|
#include <XrdOssPath.hh>
Classes | |
struct | fnInfo |
Public Types | |
enum | theSfx { isBase = 0, isAnew = 1, sfxMigF = 1, isFail = 2, isLock = 3, isPin = 4, isStage = 5, sfxMigL = 5, sfxMemF = 5, isMkeep = 6, isMlock = 7, isMmap = 8, sfxMemL = 8, isPfn = 9, sfxLast = 9, sfxNum = 10 } |
Public Member Functions | |
XrdOssPath () | |
~XrdOssPath () | |
Static Public Member Functions | |
static int | Convert (char *dst, int dln, const char *oldP, const char *newP) |
static const char * | Extract (char *path, char *lbuf, int &lbsz) |
static char * | genPath (const char *inPath, const char *cgrp, char *sfx) |
static char * | genPFN (fnInfo &Info, char *buff, int blen, const char *Path=0) |
static char * | genPFN (char *dst, int dln, const char *src) |
static int | getCname (const char *path, char *Cache, char *lbuf=0, int lbsz=0) |
static int | isXA (const char *path) |
static theSfx | pathType (const char *Path, int chkWhat=chkAll) |
static void | Trim2Base (char *eP) |
Static Public Attributes | |
static const char | xChar = '%' |
static const int | sfxLen = 4 |
static const char * | Sfx [sfxNum] |
static const int | chkMem = 0x01 |
static const int | chkMig = 0x02 |
static const int | chkPfn = 0x04 |
static const int | chkAll = 0x07 |
Static Private Member Functions | |
static char * | bin2hex (char *inbuff, int dlen, char *buff) |
static int | Init (char *pfnPfx) |
static char * | posCname (char *lbuf, int lbsz, int &cnsz) |
Static Private Attributes | |
static char | h2c [16] |
enum XrdOssPath::theSfx |
XrdOssPath::XrdOssPath | ( | ) | [inline] |
XrdOssPath::~XrdOssPath | ( | ) | [inline] |
char * XrdOssPath::bin2hex | ( | char * | inbuff, |
int | dlen, | ||
char * | buff | ||
) | [static, private] |
int XrdOssPath::Convert | ( | char * | dst, |
int | dln, | ||
const char * | oldP, | ||
const char * | newP | ||
) | [static] |
References xChar, and XrdOssTAMP.
Referenced by XrdOssSys::RenameLink().
const char * XrdOssPath::Extract | ( | char * | path, |
char * | lbuf, | ||
int & | lbsz | ||
) | [static] |
References index(), lstat(), posCname(), stat(), and xChar.
Referenced by XrdCnsLogServer::Massage(), and XrdCnsInventory::Xref().
char * XrdOssPath::genPath | ( | const char * | inPath, |
const char * | cgrp, | ||
char * | sfx | ||
) | [static] |
References h2c, index(), XrdOssSpace::minSNbsz, and xChar.
Referenced by XrdFrmAdmin::AuditSpaceXA(), XrdFrmAdmin::AuditUsageXA(), and XrdOssCache_FS::XrdOssCache_FS().
char * XrdOssPath::genPFN | ( | fnInfo & | Info, |
char * | buff, | ||
int | blen, | ||
const char * | Path = 0 |
||
) | [static] |
References bin2hex(), h2c, Init(), XrdSysMutex::Lock(), XrdOssPath::fnInfo::Path, Path, XrdOssPath::fnInfo::Plen, XrdOssPath::fnInfo::Sfx, sfxLen, XrdOssPath::fnInfo::Slash, XrdSysMutex::UnLock(), and XrdOssTAMP.
Referenced by XrdOssCache::Alloc(), and XrdFrmAdmin::AuditSpaceAX().
char * XrdOssPath::genPFN | ( | char * | dst, |
int | dln, | ||
const char * | src | ||
) | [static] |
int XrdOssPath::getCname | ( | const char * | path, |
char * | Cache, | ||
char * | lbuf = 0 , |
||
int | lbsz = 0 |
||
) | [static] |
References lstat(), posCname(), stat(), and xChar.
Referenced by XrdFrmPurge::Add(), XrdFrmAdmin::QuerySpace(), and XrdFrmAdmin::Reloc().
int XrdOssPath::Init | ( | char * | pfnPfx | ) | [static, private] |
static int XrdOssPath::isXA | ( | const char * | path | ) | [inline, static] |
References xChar.
Referenced by XrdOssSys::Reloc().
XrdOssPath::theSfx XrdOssPath::pathType | ( | const char * | Path, |
int | chkWhat = chkAll |
||
) | [static] |
References chkAll, chkMem, chkMig, isBase, rindex, Sfx, sfxLast, sfxMemF, sfxMemL, and sfxMigL.
Referenced by XrdCnsInventory::Conduct(), XrdFrmFiles::Process(), and XrdFrmAdmin::UnlinkFile().
char * XrdOssPath::posCname | ( | char * | lbuf, |
int | lbsz, | ||
int & | cnsz | ||
) | [static, private] |
References index(), XrdOssSpace::maxSNlen, and xChar.
Referenced by Extract(), and getCname().
void XrdOssPath::Trim2Base | ( | char * | eP | ) | [static] |
References xChar.
Referenced by XrdOssCache::Adjust(), XrdOssSys::BreakLink(), XrdOssCache::Find(), and XrdOssSys::RenameLink().
const int XrdOssPath::chkAll = 0x07 [static] |
Referenced by pathType().
const int XrdOssPath::chkMem = 0x01 [static] |
Referenced by pathType().
const int XrdOssPath::chkMig = 0x02 [static] |
Referenced by pathType().
const int XrdOssPath::chkPfn = 0x04 [static] |
char XrdOssPath::h2c [static, private] |
const char * XrdOssPath::Sfx [static] |
{".anew", ".fail", ".lock", ".pin", ".stage", ".mmap", ".mkeep", ".mlock",".pfn", 0}
Referenced by pathType(), XrdOssSys::Rename(), and XrdOssSys::Unlink().
const int XrdOssPath::sfxLen = 4 [static] |
Referenced by genPFN().
const char XrdOssPath::xChar = '%' [static] |
Referenced by XrdOssSys::BreakLink(), Convert(), Extract(), genPath(), genPFN(), getCname(), isXA(), XrdFrmAdmin::isXA(), posCname(), XrdOssSys::RenameLink(), and Trim2Base().