Pyrogenesis  trunk
Classes | Typedefs | Functions | Variables
Filesystem.h File Reference
#include "lib/file/file.h"
#include "lib/file/io/write_buffer.h"
#include "lib/file/vfs/vfs_util.h"
#include "ps/CStrForward.h"
#include "ps/Errors.h"
Include dependency graph for Filesystem.h:

Go to the source code of this file.

Classes

class  CVFSFile
 Reads a file, then gives read-only access to the contents. More...
 

Typedefs

typedef Status(* FileReloadFunc) (void *param, const VfsPath &path)
 callback function type for file change notifications More...
 

Functions

bool VfsFileExists (const VfsPath &pathname)
 
bool VfsDirectoryExists (const VfsPath &pathname)
 
void RegisterFileReloadFunc (FileReloadFunc func, void *obj)
 register a callback function to be called by ReloadChangedFiles More...
 
void UnregisterFileReloadFunc (FileReloadFunc func, void *obj)
 delete a callback function registered with RegisterFileReloadFunc (removes any with the same func and obj) More...
 
Status ReloadChangedFiles ()
 poll for directory change notifications and reload all affected files. More...
 
std::wstring GetWstringFromWpath (const fs::wpath &path)
 Helper function to handle API differences between Boost Filesystem v2 and v3. More...
 
 ERROR_GROUP (CVFSFile)
 
 ERROR_TYPE (CVFSFile, LoadFailed)
 
 ERROR_TYPE (CVFSFile, AlreadyLoaded)
 

Variables

PIVFS g_VFS
 

Typedef Documentation

◆ FileReloadFunc

typedef Status(* FileReloadFunc) (void *param, const VfsPath &path)

callback function type for file change notifications

Function Documentation

◆ ERROR_GROUP()

ERROR_GROUP ( CVFSFile  )

◆ ERROR_TYPE() [1/2]

ERROR_TYPE ( CVFSFile  ,
LoadFailed   
)

◆ ERROR_TYPE() [2/2]

ERROR_TYPE ( CVFSFile  ,
AlreadyLoaded   
)

◆ GetWstringFromWpath()

std::wstring GetWstringFromWpath ( const fs::wpath path)

Helper function to handle API differences between Boost Filesystem v2 and v3.

◆ RegisterFileReloadFunc()

void RegisterFileReloadFunc ( FileReloadFunc  func,
void *  obj 
)

register a callback function to be called by ReloadChangedFiles

◆ ReloadChangedFiles()

Status ReloadChangedFiles ( )

poll for directory change notifications and reload all affected files.

must be called regularly (e.g. once a frame), else notifications may be lost. note: polling is much simpler than asynchronous notifications.

◆ UnregisterFileReloadFunc()

void UnregisterFileReloadFunc ( FileReloadFunc  func,
void *  obj 
)

delete a callback function registered with RegisterFileReloadFunc (removes any with the same func and obj)

◆ VfsDirectoryExists()

bool VfsDirectoryExists ( const VfsPath pathname)

◆ VfsFileExists()

bool VfsFileExists ( const VfsPath pathname)

Variable Documentation

◆ g_VFS

PIVFS g_VFS