xrootd
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Private Attributes | List of all members
XrdOucFileInfo Class Reference

#include <XrdOucFileInfo.hh>

Collaboration diagram for XrdOucFileInfo:
Collaboration graph
[legend]

Public Member Functions

void AddDigest (const char *hname, const char *hval)
 
void AddUrl (const char *url, const char *cntry=0, int prty=0, bool fifo=true)
 
void AddFileName (const char *filename)
 
void AddLfn (const char *lfn)
 
void AddProtocol (const char *protname)
 
const char * GetDigest (const char *&hval, bool xrdname=true)
 
const char * GetLfn ()
 
const char * GetTargetName ()
 
long long GetSize ()
 
const char * GetUrl (char *cntry=0, int *prty=0)
 
bool HasProtocol (const char *protname)
 
void SetSize (long long fsz)
 
 XrdOucFileInfo (const char *lfn=0)
 
 ~XrdOucFileInfo ()
 Destructor.
 

Public Attributes

XrdOucFileInfonextFile
 Link field to simply miltiple file processing.
 

Private Attributes

XrdOucFIHash * fHash
 
XrdOucFIHash * fHashNext
 
XrdOucFIUrl * fUrl
 
XrdOucFIUrl * fUrlNext
 
char * fLfn
 
char * fTargetName
 
long long fSize
 
std::string protList
 

Constructor & Destructor Documentation

◆ XrdOucFileInfo()

XrdOucFileInfo::XrdOucFileInfo ( const char *  lfn = 0)
inline

Constructor

Parameters
lfnAn optional logical file name associated with this file.

References fLfn.

◆ ~XrdOucFileInfo()

XrdOucFileInfo::~XrdOucFileInfo ( )

Destructor.

Member Function Documentation

◆ AddDigest()

void XrdOucFileInfo::AddDigest ( const char *  hname,
const char *  hval 
)

Add a digest to the file descriptions.

Parameters
hnamePoiner to hash name.
hvalPoiner to hash value.

◆ AddFileName()

void XrdOucFileInfo::AddFileName ( const char *  filename)

Add target filename to the file descriptions.

Parameters
filenamePoiner to file name.

◆ AddLfn()

void XrdOucFileInfo::AddLfn ( const char *  lfn)

Add logical filename to the file descriptions.

Parameters
lfnPoiner to logical file name.

◆ AddProtocol()

void XrdOucFileInfo::AddProtocol ( const char *  protname)

Add protocol to the list of available protocols.

Parameters
protnamePoiner to protocol name ending with a colon

◆ AddUrl()

void XrdOucFileInfo::AddUrl ( const char *  url,
const char *  cntry = 0,
int  prty = 0,
bool  fifo = true 
)

Add a url to the file descriptions.

Parameters
urlPoiner to file url.
cntryPoiner to the optional 2-char null terminated country code. Upper case country codes are converted to lower case.
prtySelection priority. If less than 0 it is set to zero. Urls are placed in increasing prty order (0 is top priority).
fifoWhen true, the location is placed at the end of locations of equal pririoty. Otherwise, is is placed at the head.

◆ GetDigest()

const char * XrdOucFileInfo::GetDigest ( const char *&  hval,
bool  xrdname = true 
)

Obtain the next digest that can be used to validate the file.

Parameters
hvalPlace to put the pointer to the hash value in ASCII encoded hex,
xrdnameWhen true the corresponding name expected by XRootD is returned
Returns
Pointer to the hash name. The name and value are valid until this object is deleted. If no more hashes exist, a nil pointer is returned. A subsequent call will start at the front of the list.

◆ GetLfn()

const char * XrdOucFileInfo::GetLfn ( )
inline

Obtain the logical file name associated with this file.

Returns
Pointer to the lfn. The lfn is valid until this object is deleted. A nil pointer indicates that no lfn has been specified.

References fLfn.

◆ GetSize()

long long XrdOucFileInfo::GetSize ( )
inline

Get file size.

Returns
The size of the file. If it is negative the size has not been set.

References fSize.

◆ GetTargetName()

const char * XrdOucFileInfo::GetTargetName ( )
inline

Obtain the target file name.

Returns
Pointer to the target file name. The target filename is valid until this object is deleted.

References fTargetName.

◆ GetUrl()

const char * XrdOucFileInfo::GetUrl ( char *  cntry = 0,
int *  prty = 0 
)

Obtain the next url for this file.

Parameters
cntryIf not nil, the null terminated country code is placed in the buffer which must be atleast three characters in size.
prtyIf not nil, the url's priority is placed in the int pointed to by this parameter.
Returns
Pointer to the url. The url is valid until this object is deleted. If no more urls exist, a nil pointer is returned. A subsequent call will start at the front of teh list.

◆ HasProtocol()

bool XrdOucFileInfo::HasProtocol ( const char *  protname)

Check if protocol is in he list of protocols. This does not indicate that an actual url for the protocol was added to this object.

Parameters
protnamePoiner to protocol name ending with a colon
Returns
true if the protocol was encountered and false otherwise.

◆ SetSize()

void XrdOucFileInfo::SetSize ( long long  fsz)
inline

Set file size.

Parameters
fszSupposed size of the file.

References fSize.

Member Data Documentation

◆ fHash

XrdOucFIHash* XrdOucFileInfo::fHash
private

◆ fHashNext

XrdOucFIHash* XrdOucFileInfo::fHashNext
private

◆ fLfn

char* XrdOucFileInfo::fLfn
private

Referenced by GetLfn(), and XrdOucFileInfo().

◆ fSize

long long XrdOucFileInfo::fSize
private

Referenced by GetSize(), and SetSize().

◆ fTargetName

char* XrdOucFileInfo::fTargetName
private

Referenced by GetTargetName().

◆ fUrl

XrdOucFIUrl* XrdOucFileInfo::fUrl
private

◆ fUrlNext

XrdOucFIUrl* XrdOucFileInfo::fUrlNext
private

◆ nextFile

XrdOucFileInfo* XrdOucFileInfo::nextFile

Link field to simply miltiple file processing.

◆ protList

std::string XrdOucFileInfo::protList
private

The documentation for this class was generated from the following file: