mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-11 02:28:18 +00:00
26 lines
663 B
C++
26 lines
663 B
C++
#ifndef ENGINE_STORAGE_H
|
|
#define ENGINE_STORAGE_H
|
|
|
|
#include "kernel.h"
|
|
|
|
class IStorage : public IInterface
|
|
{
|
|
MACRO_INTERFACE("storage", 0)
|
|
public:
|
|
enum
|
|
{
|
|
TYPE_SAVE = 0,
|
|
TYPE_ALL = -1
|
|
};
|
|
|
|
virtual void ListDirectory(int Type, const char *pPath, FS_LISTDIR_CALLBACK pfnCallback, void *pUser) = 0;
|
|
virtual IOHANDLE OpenFile(const char *pFilename, int Flags, int Type, char *pBuffer = 0, int BufferSize = 0) = 0;
|
|
virtual bool RemoveFile(const char *pFilename, int Type) = 0;
|
|
virtual bool CreateFolder(const char *pFoldername, int Type) = 0;
|
|
};
|
|
|
|
extern IStorage *CreateStorage(const char *pApplicationName, int NumArgs, const char **ppArguments);
|
|
|
|
|
|
#endif
|