Pyrogenesis  trunk
Classes | Namespaces | Functions | Variables
vfs.cpp File Reference
#include "precompiled.h"
#include "lib/file/vfs/vfs.h"
#include "lib/allocators/shared_ptr.h"
#include "lib/posix/posix_pthread.h"
#include "lib/file/file_system.h"
#include "lib/file/common/file_stats.h"
#include "lib/file/common/trace.h"
#include "lib/file/archive/archive.h"
#include "lib/file/io/io.h"
#include "lib/file/vfs/vfs_tree.h"
#include "lib/file/vfs/vfs_lookup.h"
#include "lib/file/vfs/vfs_populate.h"
#include "lib/file/vfs/file_cache.h"
Include dependency graph for vfs.cpp:

Classes

struct  anonymous_namespace{vfs.cpp}::ScopedLock
 
class  VFS
 

Namespaces

 anonymous_namespace{vfs.cpp}
 

Functions

 STATUS_ADD_DEFINITIONS (vfsStatusDefinitions)
 
PIVFS CreateVfs (size_t cacheSize)
 create an instance of a Virtual File System. More...
 

Variables

static const StatusDefinition vfsStatusDefinitions []
 
static pthread_mutex_t vfs_mutex = PTHREAD_MUTEX_INITIALIZER
 

Function Documentation

PIVFS CreateVfs ( size_t  cacheSize)

create an instance of a Virtual File System.

Parameters
cacheSizesize [bytes] of memory to reserve for a file cache, or zero to disable it. if small enough to fit, file contents are stored here until no references remain and they are evicted.

note: there is no limitation to a single instance, it may make sense to create and destroy VFS instances during each unit test.

STATUS_ADD_DEFINITIONS ( vfsStatusDefinitions  )

Variable Documentation

const StatusDefinition vfsStatusDefinitions[]
static
Initial value:
= {
{ ERR::VFS_DIR_NOT_FOUND, L"VFS directory not found" },
{ ERR::VFS_FILE_NOT_FOUND, L"VFS file not found" },
{ ERR::VFS_ALREADY_MOUNTED, L"VFS path already mounted" }
}
const Status VFS_ALREADY_MOUNTED
Definition: vfs.h:38
const Status VFS_DIR_NOT_FOUND
Definition: vfs.h:36
const Status VFS_FILE_NOT_FOUND
Definition: vfs.h:37