Pyrogenesis HEAD
Pyrogenesis, a RTS Engine
vfs_populate.cpp File Reference
#include "precompiled.h"
#include "lib/file/vfs/vfs_populate.h"
#include "lib/file/archive/archive_zip.h"
#include "lib/file/vfs/vfs_tree.h"
#include "lib/file/vfs/vfs_lookup.h"
#include "lib/file/vfs/vfs.h"
Include dependency graph for vfs_populate.cpp:

Classes

struct  CompareFileInfoByName
 
class  PopulateHelper
 

Functions

Status vfs_Populate (VfsDirectory *directory)
 populate the directory from the attached real directory. More...
 
Status vfs_Attach (VfsDirectory *directory, const PRealDirectory &realDirectory)
 attach a real directory to a VFS directory. More...
 

Function Documentation

◆ vfs_Attach()

Status vfs_Attach ( VfsDirectory directory,
const PRealDirectory realDirectory 
)

attach a real directory to a VFS directory.

when the VFS directory is accessed, it will first be populated from the real directory. (this delays the impact of mounting a large directory, distributing the cost from startup to the first accesses to each subdirectory.)

note: the most recently attached real directory will be used when creating files in the VFS directory.

◆ vfs_Populate()

Status vfs_Populate ( VfsDirectory directory)

populate the directory from the attached real directory.

adds each real file and subdirectory entry to the VFS directory. the full contents of any archives in the real directory are also added.

has no effect if no directory has been attached since the last populate.