22 bool usereadahead =
true,
23 std::chrono::milliseconds
timeout = 2s,
24 const QStringList *possibleAuxiliaryFiles =
nullptr);
27 bool ReOpen(
const QString& newFilename);
29 long long Seek(
long long pos,
int whence,
long long curpos = -1);
31 static bool DeleteFile(
const QString &url);
32 static bool Exists(
const QString &url,
struct stat *fileinfo);
33 static bool Exists(
const QString &url);
34 static QString GetFileHash(
const QString &url);
35 static QDateTime LastModified(
const QString &url);
36 QDateTime LastModified(
void)
const;
37 static QString FindFile(
const QString &
filename,
const QString &host,
38 const QString &storageGroup,
bool useRegex =
false,
39 bool allowFallback =
false);
41 static QStringList FindFileList(
const QString &
filename,
const QString &host,
42 const QString &storageGroup,
bool useRegex =
false,
43 bool allowFallback =
false);
44 static bool CopyFile(
const QString &src,
const QString &dst,
45 bool overwrite =
false,
bool verify =
false);
46 static bool MoveFile(
const QString &src,
const QString &dst,
47 bool overwrite =
false);
49 int Write(
const void *data,
int size);
50 int Read(
void *data,
int size);
52 bool SetBlocking(
bool m_block =
true);
54 bool SaveAs(QByteArray &data);
56 void SetTimeout(
bool fast);
58 bool isOpen(
void)
const;
59 static bool isLocal(
const QString &path);
60 bool isLocal(
void)
const;
62 long long GetRealFileSize(
void);
65 {
return m_auxFiles; }
69 bool OpenInternal(
void);
70 void Close(
bool haslock =
false);
71 bool CheckConnection(
bool repos =
true);
72 bool IsConnected(
void);
73 bool Resume(
bool repos =
true);
74 long long SeekInternal(
long long pos,
int whence,
long long curpos = -1);
79 bool m_useReadAhead {
true};
80 std::chrono::milliseconds m_timeoutMs {2s};
81 long long m_fileSize {-1};
82 bool m_timeoutIsFast {
false};
83 long long m_readPosition {0LL};
84 long long m_lastPosition {0LL};
85 bool m_canResume {
false};
86 int m_recorderNum {0};
91 QString m_query {
"QUERY_FILETRANSFER %1"};
93 bool m_writeMode {
false};
94 bool m_completed {
false};