56 bool XrdPosixMap::Debug =
false;
73 else newflags |= S_IFREG;
91 if (!statInfo)
return EIO;
93 memset(&buf,
'\0',
sizeof(buf));
100 if (buf.st_mode & S_IRUSR) buf.st_mode |= S_IROTH;
101 if (buf.st_mode & S_IWUSR) buf.st_mode |= S_IWOTH;
102 if (buf.st_mode & S_IXUSR) buf.st_mode |= S_IXOTH;
103 buf.st_mtime =
static_cast<time_t
>(statInfo->GetModTime());
104 buf.st_ctime = buf.st_mtime;
105 buf.st_size =
static_cast<size_t>(statInfo->GetSize());
106 buf.st_ino =
static_cast<ino_t
>(strtoll(statInfo->GetId().c_str(), 0, 10));
107 buf.st_blocks = buf.st_size/512 + buf.st_size%512;
111 if (statInfo->ExtendedFormat())
112 {buf.st_ctime =
static_cast<time_t
>(statInfo->GetChangeTime());
113 buf.st_atime =
static_cast<time_t
>(statInfo->GetAccessTime());
123 int XrdPosixMap::mapCode(
int rc)
192 if (Status.
IsOK())
return 0;
212 ecMsg = errno = eNum;
213 return (retneg1 ? -1 : -eNum);
int stat(const char *path, struct stat *buf)
static const dev_t XRDSFS_HASBKUP
static const dev_t XRDSFS_OFFLINE
static int toErrno(int xerr)
StatInfo * GetStatInfo()
Get the stat info object.
@ IsReadable
Read access is allowed.
@ IsDir
This is a directory.
@ Other
Neither a file nor a directory.
@ BackUpExists
Back up copy exists.
@ XBitSet
Executable/searchable bit set.
@ Offline
File is not online (ie. on disk)
@ IsWritable
Write access is allowed.
const std::string & GetErrorMessage() const
Get error message.
std::string ToStr() const
Convert to string.
static mode_t Flags2Mode(dev_t *rdv, uint32_t flags)
static int Entry2Buf(const XrdCl::DirectoryList::ListEntry &dirEnt, struct stat &buf)
static int Result(const XrdCl::XRootDStatus &Status, XrdOucECMsg &ecMsg, bool retneg1=false)
static XrdCl::Access::Mode Mode2Access(mode_t mode)
const uint16_t errQueryNotSupported
const uint16_t errInvalidAddr
const uint16_t errStreamDisconnect
const uint16_t errRedirectLimit
const uint16_t errErrorResponse
const uint16_t errTlsError
const uint16_t errOperationExpired
const uint16_t errNotImplemented
Operation is not implemented.
const uint16_t errLoginFailed
const uint16_t errNoMoreFreeSIDs
const uint16_t errInProgress
const uint16_t errNotFound
const uint16_t errSocketTimeout
const uint16_t errDataError
data is corrupted
const uint16_t errInvalidOp
const uint16_t errHandShakeFailed
const uint16_t errConfig
System misconfigured.
const uint16_t errInvalidResponse
const uint16_t errInvalidArgs
const uint16_t errInvalidRedirectURL
const uint16_t errConnectionError
const uint16_t errNotSupported
const uint16_t errSocketError
const uint16_t errRetry
Try again for whatever reason.
const uint16_t errCheckSumError
const uint16_t errOperationInterrupted
const uint16_t errNoMoreReplicas
No more replicas to try.
const uint16_t errInvalidSession
const uint16_t errSocketDisconnected
const uint16_t errAuthFailed
const uint16_t errInvalidMessage
thread_local XrdOucECMsg ecMsg
@ OX
world executable/browsable
@ GX
group executable/browsable
@ UX
owner executable/browsable
uint16_t code
Error type, or additional hints on what to do.
bool IsOK() const
We're fine.
uint32_t errNo
Errno, if any.