#include <File.h>
|
| CFile () |
|
| ~CFile () |
|
bool | CURLCreate (const std::string &url) |
|
bool | CURLAddOption (CURLOptionType type, const char *name, const char *value) |
|
bool | CURLOpen (unsigned int flags) |
|
bool | Open (const CURL &file, const unsigned int flags=0) |
|
bool | Open (const std::string &strFileName, const unsigned int flags=0) |
|
bool | OpenForWrite (const CURL &file, bool bOverWrite=false) |
|
bool | OpenForWrite (const std::string &strFileName, bool bOverWrite=false) |
|
ssize_t | LoadFile (const CURL &file, std::vector< uint8_t > &outputBuffer) |
|
ssize_t | Read (void *bufPtr, size_t bufSize) |
|
bool | ReadLine (std::string &line) |
| String reading by line.
|
|
ReadLineResult | ReadLine (char *buffer, std::size_t bufferSize) |
|
ssize_t | Write (const void *bufPtr, size_t bufSize) |
|
void | Flush () |
|
int64_t | Seek (int64_t iFilePosition, int iWhence=SEEK_SET) |
|
int | Truncate (int64_t iSize) |
|
int64_t | GetPosition () const |
|
int64_t | GetLength () |
|
void | Close () |
|
int | GetChunkSize () |
|
const std::string | GetProperty (XFILE::FileProperty type, const std::string &name="") const |
|
const std::vector< std::string > | GetPropertyValues (XFILE::FileProperty type, const std::string &name="") const |
|
ssize_t | LoadFile (const std::string &filename, std::vector< uint8_t > &outputBuffer) |
|
const std::unique_ptr< BitstreamStats > & | GetBitstreamStats () const |
|
int | IoControl (IOControl request, void *param) |
|
IFile * | GetImplementation () const |
|
int | Stat (struct __stat64 *buffer) |
|
double | GetDownloadSpeed () |
|
|
static int | DetermineChunkSize (const int srcChunkSize, const int reqChunkSize) |
|
static bool | Exists (const CURL &file, bool bUseCache=true) |
|
static bool | Delete (const CURL &file) |
|
static int | Stat (const CURL &file, struct __stat64 *buffer) |
| Fills struct __stat64 with information about file specified by url.
|
|
static bool | Rename (const CURL &file, const CURL &urlNew) |
|
static bool | Copy (const CURL &file, const CURL &dest, XFILE::IFileCallback *pCallback=NULL, void *pContext=NULL) |
|
static bool | SetHidden (const CURL &file, bool hidden) |
|
static bool | Exists (const std::string &strFileName, bool bUseCache=true) |
|
static int | Stat (const std::string &strFileName, struct __stat64 *buffer) |
| Fills struct __stat64 with information about file specified by filename.
|
|
static bool | Delete (const std::string &strFileName) |
|
static bool | Rename (const std::string &strFileName, const std::string &strNewFileName) |
|
static bool | Copy (const std::string &strFileName, const std::string &strDest, XFILE::IFileCallback *pCallback=NULL, void *pContext=NULL) |
|
static bool | SetHidden (const std::string &fileName, bool hidden) |
|
◆ CFile()
◆ ~CFile()
◆ Close()
◆ Copy() [1/2]
◆ Copy() [2/2]
bool CFile::Copy |
( |
const std::string & | strFileName, |
|
|
const std::string & | strDest, |
|
|
XFILE::IFileCallback * | pCallback = NULL, |
|
|
void * | pContext = NULL ) |
|
static |
◆ CURLAddOption()
◆ CURLCreate()
bool CFile::CURLCreate |
( |
const std::string & | url | ) |
|
◆ CURLOpen()
bool CFile::CURLOpen |
( |
unsigned int | flags | ) |
|
◆ Delete() [1/2]
◆ Delete() [2/2]
bool CFile::Delete |
( |
const std::string & | strFileName | ) |
|
|
static |
◆ DetermineChunkSize()
int CFile::DetermineChunkSize |
( |
const int | srcChunkSize, |
|
|
const int | reqChunkSize ) |
|
static |
◆ Exists() [1/2]
bool CFile::Exists |
( |
const CURL & | file, |
|
|
bool | bUseCache = true ) |
|
static |
◆ Exists() [2/2]
bool CFile::Exists |
( |
const std::string & | strFileName, |
|
|
bool | bUseCache = true ) |
|
static |
◆ Flush()
◆ GetBitstreamStats()
const std::unique_ptr< BitstreamStats > & XFILE::CFile::GetBitstreamStats |
( |
| ) |
const |
|
inline |
◆ GetChunkSize()
int CFile::GetChunkSize |
( |
| ) |
|
◆ GetDownloadSpeed()
double CFile::GetDownloadSpeed |
( |
| ) |
|
◆ GetImplementation()
IFile * XFILE::CFile::GetImplementation |
( |
| ) |
const |
|
inline |
◆ GetLength()
◆ GetPosition()
int64_t CFile::GetPosition |
( |
| ) |
const |
◆ GetProperty()
const std::string CFile::GetProperty |
( |
XFILE::FileProperty | type, |
|
|
const std::string & | name = "" ) const |
◆ GetPropertyValues()
const std::vector< std::string > CFile::GetPropertyValues |
( |
XFILE::FileProperty | type, |
|
|
const std::string & | name = "" ) const |
◆ IoControl()
◆ LoadFile() [1/2]
◆ LoadFile() [2/2]
ssize_t CFile::LoadFile |
( |
const std::string & | filename, |
|
|
std::vector< uint8_t > & | outputBuffer ) |
◆ Open() [1/2]
bool CFile::Open |
( |
const CURL & | file, |
|
|
const unsigned int | flags = 0 ) |
Attempt to open an IFile instance.
- Parameters
-
file | reference to CCurl file description |
flags | see IFileTypes.h |
- Returns
- true on success, false otherwise
Remarks: Open can only be called once. Calling Open() on an already opened file will fail except if flag READ_REOPEN is set and the underlying file has an implementation of ReOpen().
◆ Open() [2/2]
bool CFile::Open |
( |
const std::string & | strFileName, |
|
|
const unsigned int | flags = 0 ) |
◆ OpenForWrite() [1/2]
bool CFile::OpenForWrite |
( |
const CURL & | file, |
|
|
bool | bOverWrite = false ) |
◆ OpenForWrite() [2/2]
bool CFile::OpenForWrite |
( |
const std::string & | strFileName, |
|
|
bool | bOverWrite = false ) |
◆ Read()
Attempt to read bufSize bytes from currently opened file into buffer bufPtr.
- Parameters
-
bufPtr | pointer to buffer |
bufSize | size of the buffer |
- Returns
- number of successfully read bytes if any bytes were read and stored in buffer, zero if no bytes are available to read (end of file was reached) or undetectable error occur, -1 in case of any explicit error
◆ ReadLine() [1/2]
◆ ReadLine() [2/2]
bool XFILE::CFile::ReadLine |
( |
std::string & | line | ) |
|
String reading by line.
- Parameters
-
- Returns
- True if has success, otherwise false for EOF or error
◆ Rename() [1/2]
bool CFile::Rename |
( |
const CURL & | file, |
|
|
const CURL & | urlNew ) |
|
static |
◆ Rename() [2/2]
bool CFile::Rename |
( |
const std::string & | strFileName, |
|
|
const std::string & | strNewFileName ) |
|
static |
◆ Seek()
◆ SetHidden() [1/2]
◆ SetHidden() [2/2]
bool CFile::SetHidden |
( |
const std::string & | fileName, |
|
|
bool | hidden ) |
|
static |
◆ Stat() [1/3]
Fills struct __stat64 with information about file specified by url.
For st_mode function will set correctly _S_IFDIR (directory) flag and may set _S_IREAD (read permission), _S_IWRITE (write permission) flags if such information is available. Function may set st_size (file size), st_atime, st_mtime, st_ctime (access, modification, creation times). Any other flags and members of __stat64 that didn't updated with actual file information will be set to zero (st_nlink can be set ether to 1 or zero).
- Parameters
-
[in] | file | specifies requested file. Ends with a directory separator for directories. |
[out] | buffer | pointer to __stat64 buffer to receive information about file |
- Returns
- zero for success, -1 otherwise.
◆ Stat() [2/3]
int CFile::Stat |
( |
const std::string & | strFileName, |
|
|
struct __stat64 * | buffer ) |
|
static |
Fills struct __stat64 with information about file specified by filename.
For st_mode function will set correctly _S_IFDIR (directory) flag and may set _S_IREAD (read permission), _S_IWRITE (write permission) flags if such information is available. Function may set st_size (file size), st_atime, st_mtime, st_ctime (access, modification, creation times). Any other flags and members of __stat64 that didn't updated with actual file information will be set to zero (st_nlink can be set ether to 1 or zero).
- Parameters
-
[in] | strFileName | specifies requested file. Ends with a directory separator for directories. |
[out] | buffer | pointer to __stat64 buffer to receive information about file |
- Returns
- zero for success, -1 otherwise.
◆ Stat() [3/3]
Fills struct __stat64 with information about currently open file For st_mode function will set correctly _S_IFDIR (directory) flag and may set _S_IREAD (read permission), _S_IWRITE (write permission) flags if such information is available. Function may set st_size (file size), st_atime, st_mtime, st_ctime (access, modification, creation times). Any other flags and members of __stat64 that didn't updated with actual file information will be set to zero (st_nlink can be set ether to 1 or zero).
- Parameters
-
buffer | pointer to __stat64 buffer to receive information about file |
- Returns
- zero of success, -1 otherwise.
◆ Truncate()
◆ Write()
ssize_t CFile::Write |
( |
const void * | bufPtr, |
|
|
size_t | bufSize ) |
Attempt to write bufSize bytes from buffer bufPtr into currently opened file.
- Parameters
-
bufPtr | pointer to buffer |
bufSize | size of the buffer |
- Returns
- number of successfully written bytes if any bytes were written, zero if no bytes were written and no detectable error occur, -1 in case of any explicit error
The documentation for this class was generated from the following files: