Pyrogenesis trunk
Functions | Variables
Filesystem.cpp File Reference
#include "precompiled.h"
#include "Filesystem.h"
#include "lib/sysdep/dir_watch.h"
#include "lib/utf8.h"
#include "ps/CLogger.h"
#include "ps/CStr.h"
#include "ps/Profile.h"
#include <boost/filesystem.hpp>
Include dependency graph for Filesystem.cpp:

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...
 
static bool CanIgnore (const DirWatchNotification &notification)
 
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...
 

Variables

PIVFS g_VFS
 
static std::vector< std::pair< FileReloadFunc, void * > > g_ReloadFuncs
 

Function Documentation

◆ CanIgnore()

static bool CanIgnore ( const DirWatchNotification notification)
static

◆ 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_ReloadFuncs

std::vector<std::pair<FileReloadFunc, void*> > g_ReloadFuncs
static

◆ g_VFS

PIVFS g_VFS