mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-12-30 15:17:27 +00:00
c37905e465
move module initialization into a module manager, still has some issues like stopping not working and debug crashing add #idef 0 to modules that aren't in the windows project don't double initialize and don't de-initialize for now, since many modules don't expect it and it leads to many errors remove duplicate module lists for empty modules and implemented ones, make Module non-copyable but movable add secondary project, no real use for it now add some memleak config to the emucore and add asmjit path to rpcs3 small rebase error fixed to get it to compile again add filters for emucore re-add the module manager and static file WIP commit, linker errors abound some more abstraction layer stuff fix the remaining linker errors, re-enable platform specific mouse, pad and keyboard handlers rebasing fix memset undefined and re() usage of se_t before declaration Add wxGUI define by default for cmake builds fix copy constructors of Datetime header fix copy constructors of other wx interface classes remove static declarations of global variables make wxGLCanvas constructor non-ambiguous even with wx2.8. compat mode, fix wrong std::exception constructor calls remove duplicate definition for FromUTF8 and ToUTF8 temp changes
85 lines
1.9 KiB
C++
85 lines
1.9 KiB
C++
#pragma once
|
|
|
|
#include <string>
|
|
|
|
extern const int rPATH_MKDIR_FULL;
|
|
|
|
enum rSeekMode
|
|
{
|
|
rFromStart,
|
|
rFromCurrent,
|
|
rFromEnd
|
|
};
|
|
|
|
class rFile
|
|
{
|
|
public:
|
|
enum OpenMode
|
|
{
|
|
read,
|
|
write,
|
|
read_write,
|
|
write_append,
|
|
write_excl
|
|
};
|
|
rFile();
|
|
rFile(const rFile& other) = delete;
|
|
~rFile();
|
|
rFile(const std::string& filename, rFile::OpenMode open = rFile::read);
|
|
rFile(int fd);
|
|
static bool Access(const std::string &filename, rFile::OpenMode mode);
|
|
size_t Write(const void *buffer, size_t count);
|
|
bool Write(const std::string &text);
|
|
bool Close();
|
|
bool Create(const std::string &filename, bool overwrite = false, int access = 0666);
|
|
bool Open(const std::string &filename, rFile::OpenMode mode = rFile::read, int access = 0666);
|
|
static bool Exists(const std::string&);
|
|
bool IsOpened() const;
|
|
size_t Length() const;
|
|
size_t Read(void *buffer, size_t count);
|
|
size_t Seek(size_t ofs, rSeekMode mode = rFromStart);
|
|
size_t Tell() const;
|
|
|
|
void *handle;
|
|
};
|
|
|
|
std::string rGetCwd();
|
|
bool rMkdir(const std::string &path);
|
|
bool rRmdir(const std::string &path);
|
|
bool rDirExists(const std::string &path);
|
|
bool rFileExists(const std::string &path);
|
|
bool rRemoveFile(const std::string &path);
|
|
|
|
bool rIsWritable(const std::string& path);
|
|
bool rIsReadable(const std::string& path);
|
|
bool rIsExecutable(const std::string& path);
|
|
|
|
struct rDir
|
|
{
|
|
rDir();
|
|
~rDir();
|
|
rDir(const rDir& other) = delete;
|
|
rDir(const std::string &path);
|
|
bool Open(const std::string& path);
|
|
static bool Exists(const std::string &path);
|
|
bool GetFirst(std::string *filename) const;
|
|
bool GetNext(std::string *filename) const;
|
|
|
|
void *handle;
|
|
};
|
|
struct rFileName
|
|
{
|
|
rFileName();
|
|
rFileName(const rFileName& other);
|
|
~rFileName();
|
|
rFileName(const std::string& name);
|
|
std::string GetFullPath();
|
|
std::string GetPath();
|
|
std::string GetName();
|
|
std::string GetFullName();
|
|
static bool Mkdir(const std::string& name, int permissions=0777, int flags=0);
|
|
bool Normalize();
|
|
|
|
void *handle;
|
|
};
|