18 #ifndef INCLUDED_PS_FILESYSTEM 19 #define INCLUDED_PS_FILESYSTEM 108 #endif // #ifndef INCLUDED_PS_FILESYSTEM CStr DecodeUTF8() const
Returns contents of a UTF-8 encoded file as a string with optional BOM removed.
Definition: Filesystem.cpp:157
size_t m_BufferSize
Definition: Filesystem.h:105
void RegisterFileReloadFunc(FileReloadFunc func, void *obj)
register a callback function to be called by ReloadChangedFiles
Definition: Filesystem.cpp:44
Reads a file, then gives read-only access to the contents.
Definition: Filesystem.h:71
void UnregisterFileReloadFunc(FileReloadFunc func, void *obj)
delete a callback function registered with RegisterFileReloadFunc (removes any with the same func and...
Definition: Filesystem.cpp:49
shared_ptr< IVFS > PIVFS
Definition: vfs.h:226
Status ReloadChangedFiles()
poll for directory change notifications and reload all affected files.
Definition: Filesystem.cpp:75
def log(severity, message)
Definition: tests.py:21
uint8_t u8
Definition: types.h:37
CStr GetAsString() const
Returns contents of file as a string.
Definition: Filesystem.cpp:152
PIVFS g_VFS
Definition: Filesystem.cpp:29
Status(* FileReloadFunc)(void *param, const VfsPath &path)
callback function type for file change notifications
Definition: Filesystem.h:38
bool VfsFileExists(const VfsPath &pathname)
Definition: Filesystem.cpp:33
u32 PSRETURN
Definition: Errors.h:75
CVFSFile()
Definition: Filesystem.cpp:111
const u8 * GetBuffer() const
Returns buffer of this file as a stream of bytes.
Definition: Filesystem.cpp:142
i64 Status
Error handling system.
Definition: status.h:171
~CVFSFile()
Definition: Filesystem.cpp:116
bool VfsDirectoryExists(const VfsPath &pathname)
Definition: Filesystem.cpp:38
shared_ptr< u8 > m_Buffer
Definition: Filesystem.h:104
size_t GetBufferSize() const
Definition: Filesystem.cpp:147
Definition: vfs_util.cpp:39
std::wstring GetWstringFromWpath(const fs::wpath &path)
Helper function to handle API differences between Boost Filesystem v2 and v3.
Definition: Filesystem.cpp:101
PSRETURN Load(const PIVFS &vfs, const VfsPath &filename, bool log=true)
Returns either PSRETURN_OK or PSRETURN_CVFSFile_LoadFailed.
Definition: Filesystem.cpp:120
ERROR_TYPE(CVFSFile, LoadFailed)