#include <XrdSfsNative.hh>
Public Member Functions | |
int | open (const char *fileName, XrdSfsFileOpenMode openMode, mode_t createMode, const XrdSecClientName *client=0, const char *opaque=0) |
int | close () |
int | fctl (const int cmd, const char *args, XrdOucErrInfo &out_error) |
const char * | FName () |
int | getMmap (void **Addr, off_t &Size) |
int | read (XrdSfsFileOffset fileOffset, XrdSfsXferSize preread_sz) |
XrdSfsXferSize | read (XrdSfsFileOffset fileOffset, char *buffer, XrdSfsXferSize buffer_size) |
int | read (XrdSfsAio *aioparm) |
XrdSfsXferSize | readv (XrdOucIOVec *readV, int readCount) |
XrdSfsXferSize | write (XrdSfsFileOffset fileOffset, const char *buffer, XrdSfsXferSize buffer_size) |
int | write (XrdSfsAio *aioparm) |
int | sync () |
int | sync (XrdSfsAio *aiop) |
int | stat (struct stat *buf) |
int | truncate (XrdSfsFileOffset fileOffset) |
int | getCXinfo (char cxtype[4], int &cxrsz) |
XrdSfsNativeFile (char *user=0, int monid=0) | |
~XrdSfsNativeFile () | |
Private Attributes | |
int | oh |
char * | fname |
XrdSfsNativeFile::XrdSfsNativeFile | ( | char * | user = 0 , |
|
int | monid = 0 | |||
) | [inline] |
int XrdSfsNativeFile::close | ( | ) | [virtual] |
Close the file.
Implements XrdSfsFile.
Referenced by ~XrdSfsNativeFile().
int XrdSfsNativeFile::fctl | ( | const int | cmd, | |
const char * | args, | |||
XrdOucErrInfo & | eInfo | |||
) | [virtual] |
Execute a special operation on the file (version 1)
cmd | - The operation to be performed (see below). SFS_FCTL_GETFD Return file descriptor if possible SFS_FCTL_STATV Reserved for future use. | |
args | - specific arguments to cmd SFS_FCTL_GETFD Set to zero. | |
eInfo | - The object where error info or results are to be returned. This is legacy and the error onject may be used as well. |
Implements XrdSfsFile.
const char* XrdSfsNativeFile::FName | ( | ) | [inline, virtual] |
Get the file path.
Implements XrdSfsFile.
References fname.
int XrdSfsNativeFile::getCXinfo | ( | char | cxtype[4], | |
int & | cxrsz | |||
) | [inline, virtual] |
Get compression information for the file.
cxtype | - Place where the compression algorithm name is to be placed | |
cxrsz | - Place where the compression page size is to be returned |
Implements XrdSfsFile.
int XrdSfsNativeFile::getMmap | ( | void ** | Addr, | |
off_t & | Size | |||
) | [inline, virtual] |
Get file's memory mapping if one exists (memory mapped files only).
addr | - Place where the starting memory address is returned. | |
size | - Place where the file's size is returned. |
Implements XrdSfsFile.
References SFS_OK.
int XrdSfsNativeFile::open | ( | const char * | fileName, | |
XrdSfsFileOpenMode | openMode, | |||
mode_t | createMode, | |||
const XrdSecClientName * | client = 0 , |
|||
const char * | opaque = 0 | |||
) |
int XrdSfsNativeFile::read | ( | XrdSfsAio * | aioparm | ) | [virtual] |
Read file bytes using asynchronous I/O.
aioparm | - Pointer to async I/O object controlling the I/O. |
Implements XrdSfsFile.
XrdSfsXferSize XrdSfsNativeFile::read | ( | XrdSfsFileOffset | offset, | |
char * | buffer, | |||
XrdSfsXferSize | size | |||
) | [virtual] |
Read file bytes into a buffer.
offset | - The offset where the read is to start. | |
buffer | - pointer to buffer where the bytes are to be placed. | |
size | - The number of bytes to read. |
Implements XrdSfsFile.
int XrdSfsNativeFile::read | ( | XrdSfsFileOffset | offset, | |
XrdSfsXferSize | size | |||
) | [inline, virtual] |
Preread file blocks into the file system cache.
offset | - The offset where the read is to start. | |
size | - The number of bytes to pre-read. |
Implements XrdSfsFile.
References SFS_OK.
XrdSfsXferSize XrdSfsNativeFile::readv | ( | XrdOucIOVec * | readV, | |
int | rdvCnt | |||
) | [virtual] |
Given an array of read requests (size rdvCnt), read them from the file and place the contents consecutively in the provided buffer. A dumb default implementation is supplied but should be replaced to increase performance.
readV | pointer to the array of read requests. | |
rdvcnt | the number of elements in readV. |
Reimplemented from XrdSfsFile.
int XrdSfsNativeFile::stat | ( | struct stat * | buf | ) | [virtual] |
Return state information on the file.
buf | - Pointer to the structure where info it to be returned. |
Implements XrdSfsFile.
int XrdSfsNativeFile::sync | ( | XrdSfsAio * | aiop | ) | [virtual] |
Make sure all outstanding data is actually written to the file (async).
Implements XrdSfsFile.
int XrdSfsNativeFile::sync | ( | ) | [virtual] |
Make sure all outstanding data is actually written to the file (sync).
Implements XrdSfsFile.
int XrdSfsNativeFile::truncate | ( | XrdSfsFileOffset | fsize | ) | [virtual] |
Truncate the file.
fsize | - The size that the file is to have. |
Implements XrdSfsFile.
int XrdSfsNativeFile::write | ( | XrdSfsAio * | aioparm | ) | [virtual] |
Write file bytes using asynchronous I/O.
aioparm | - Pointer to async I/O object controlling the I/O. |
Implements XrdSfsFile.
XrdSfsXferSize XrdSfsNativeFile::write | ( | XrdSfsFileOffset | offset, | |
const char * | buffer, | |||
XrdSfsXferSize | size | |||
) | [virtual] |
Write file bytes from a buffer.
offset | - The offset where the write is to start. | |
buffer | - pointer to buffer where the bytes reside. | |
size | - The number of bytes to write. |
Implements XrdSfsFile.
char* XrdSfsNativeFile::fname [private] |
Referenced by FName(), and XrdSfsNativeFile().
int XrdSfsNativeFile::oh [private] |
Referenced by XrdSfsNativeFile(), and ~XrdSfsNativeFile().