17 #include "PlatformDefs.h"     25 #if !defined(SIZE_MAX) || !defined(SSIZE_MAX)    28 #define SIZE_MAX UINTPTR_MAX    31 #define SSIZE_MAX INTPTR_MAX    33 #endif // ! SIZE_MAX || ! SSIZE_MAX    35 #include "IFileTypes.h"    48   virtual bool Open(
const CURL& url) = 0;
    49   virtual bool OpenForWrite(
const CURL& url, 
bool bOverWrite = 
false) { 
return false; }
    50   virtual bool ReOpen(
const CURL& url) { 
return false; }
    51   virtual bool Exists(
const CURL& url) = 0;
    64   virtual int Stat(
const CURL& url, 
struct __stat64* buffer) = 0;
    76   virtual int Stat(
struct __stat64* buffer);
    85   virtual ssize_t 
Read(
void* bufPtr, 
size_t bufSize) = 0;
    94   virtual ssize_t 
Write(
const void* bufPtr, 
size_t bufSize) { 
return -1;}
    95   virtual bool ReadString(
char *szLine, 
int iLineLength);
    96   virtual int64_t Seek(int64_t iFilePosition, 
int iWhence = SEEK_SET) = 0;
    97   virtual void Close() = 0;
    98   virtual int64_t GetPosition() = 0;
    99   virtual int64_t GetLength() = 0;
   100   virtual void Flush() { }
   101   virtual int Truncate(int64_t size) { 
return -1; }
   109   virtual int  GetChunkSize() {
return 0;}
   110   virtual double GetDownloadSpeed() { 
return 0.0; }
   112   virtual bool Delete(
const CURL& url) { 
return false; }
   113   virtual bool Rename(
const CURL& url, 
const CURL& urlnew) { 
return false; }
   114   virtual bool SetHidden(
const CURL& url, 
bool hidden) { 
return false; }
   116   virtual int IoControl(EIoControl request, 
void* param) { 
return -1; }
   118   virtual const std::string GetProperty(XFILE::FileProperty type, 
const std::string &name = 
"")
 const   120     return type == XFILE::FILE_PROPERTY_CONTENT_TYPE ? 
"application/octet-stream" : 
"";
   123   virtual const std::vector<std::string> GetPropertyValues(XFILE::FileProperty type, 
const std::string &name = 
"")
 const   125     std::vector<std::string> values;
   126     std::string value = GetProperty(type, name);
   129       values.emplace_back(value);
   138   IFile *m_pNewFileImp;
 
virtual ssize_t Read(void *bufPtr, size_t bufSize)=0
Attempt to read bufSize bytes from currently opened file into buffer bufPtr. 
virtual ssize_t Write(const void *bufPtr, size_t bufSize)
Attempt to write bufSize bytes from buffer bufPtr into currently opened file. 
Definition: IFile.h:94
virtual int Stat(const CURL &url, struct __stat64 *buffer)=0
Fills struct __stat64 with information about file specified by url.