18#ifndef INCLUDED_PS_FILESYSTEM
19#define INCLUDED_PS_FILESYSTEM
u32 PSRETURN
Definition: Errors.h:75
void RegisterFileReloadFunc(FileReloadFunc func, void *obj)
register a callback function to be called by ReloadChangedFiles
Definition: Filesystem.cpp:45
ERROR_TYPE(CVFSFile, LoadFailed)
bool VfsDirectoryExists(const VfsPath &pathname)
Definition: Filesystem.cpp:39
void UnregisterFileReloadFunc(FileReloadFunc func, void *obj)
delete a callback function registered with RegisterFileReloadFunc (removes any with the same func and...
Definition: Filesystem.cpp:50
PIVFS g_VFS
Definition: Filesystem.cpp:30
bool VfsFileExists(const VfsPath &pathname)
Definition: Filesystem.cpp:34
Status ReloadChangedFiles()
poll for directory change notifications and reload all affected files.
Definition: Filesystem.cpp:76
std::wstring GetWstringFromWpath(const fs::wpath &path)
Helper function to handle API differences between Boost Filesystem v2 and v3.
Definition: Filesystem.cpp:100
Status(* FileReloadFunc)(void *param, const VfsPath &path)
callback function type for file change notifications
Definition: Filesystem.h:36
Reads a file, then gives read-only access to the contents.
Definition: Filesystem.h:70
~CVFSFile()
Definition: Filesystem.cpp:115
CStr8 GetAsString() const
Returns contents of file as a string.
Definition: Filesystem.cpp:151
const u8 * GetBuffer() const
Returns buffer of this file as a stream of bytes.
Definition: Filesystem.cpp:141
std::shared_ptr< u8 > m_Buffer
Definition: Filesystem.h:102
PSRETURN Load(const PIVFS &vfs, const VfsPath &filename, bool log=true)
Returns either PSRETURN_OK or PSRETURN_CVFSFile_LoadFailed.
Definition: Filesystem.cpp:119
CVFSFile()
Definition: Filesystem.cpp:110
CStr8 DecodeUTF8() const
Returns contents of a UTF-8 encoded file as a string with optional BOM removed.
Definition: Filesystem.cpp:156
size_t m_BufferSize
Definition: Filesystem.h:103
size_t GetBufferSize() const
Definition: Filesystem.cpp:146
path wpath
Definition: pch_boost.h:53
def log(severity, message)
Definition: tests.py:27
Definition: vfs_util.cpp:39
i64 Status
Error handling system.
Definition: status.h:173
uint8_t u8
Definition: types.h:37
std::shared_ptr< IVFS > PIVFS
Definition: vfs.h:220