2 * Copyright (C) 2014-2018 Team Kodi
3 * This file is part of Kodi - https://kodi.tv
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
11 #include "filesystem/File.h"
12 #include "filesystem/IFile.h"
16 class COverrideFile
: public IFile
19 explicit COverrideFile(bool writable
);
20 ~COverrideFile() override
;
22 bool Open(const CURL
& url
) override
;
23 bool Exists(const CURL
& url
) override
;
24 int Stat(const CURL
& url
, struct __stat64
* buffer
) override
;
25 int Stat(struct __stat64
* buffer
) override
;
26 bool OpenForWrite(const CURL
& url
, bool bOverWrite
= false) override
;
27 bool Delete(const CURL
& url
) override
;
28 bool Rename(const CURL
& url
, const CURL
& urlnew
) override
;
30 ssize_t
Read(void* lpBuf
, size_t uiBufSize
) override
;
31 ssize_t
Write(const void* lpBuf
, size_t uiBufSize
) override
;
32 int64_t Seek(int64_t iFilePosition
, int iWhence
= SEEK_SET
) override
;
33 void Close() override
;
34 int64_t GetPosition() override
;
35 int64_t GetLength() override
;
38 virtual std::string
TranslatePath(const CURL
&url
) = 0;