Play-/Source/iop/Ioman_Device.h
Jean-Philip Desjardins 4985420fb2 Rename CreateDirectory to MakeDirectory.
Avoid clash with Win32 function name.
2021-01-11 15:59:10 -05:00

39 lines
928 B
C++

#pragma once
#include "Stream.h"
#include "filesystem_def.h"
namespace Iop
{
namespace Ioman
{
typedef fs::directory_iterator Directory;
class CDevice
{
public:
enum OPEN_FLAGS
{
OPEN_FLAG_RDONLY = 0x00000001,
OPEN_FLAG_WRONLY = 0x00000002,
OPEN_FLAG_RDWR = 0x00000003,
OPEN_FLAG_ACCMODE = 0x00000003,
OPEN_FLAG_CREAT = 0x00000200,
OPEN_FLAG_TRUNC = 0x00000400,
OPEN_FLAG_NOWAIT = 0x00008000, //This is probably only used by EE's FIO library
};
virtual ~CDevice() = default;
virtual Framework::CStream* GetFile(uint32, const char*) = 0;
virtual Directory GetDirectory(const char*) = 0;
virtual void MakeDirectory(const char*)
{
throw std::runtime_error("Directory creation not supported.");
}
virtual fs::path GetMountPath(const char*)
{
throw std::runtime_error("Mounting not supported.");
}
};
}
}