|
0 A.D. | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Method Summary | |
static LibError |
add_ent( TDir* td, DirEnt* ent, const char* P_parent_path, const Mount* m, DirQueue* dir_queue, Archives* archives )
See vfs_mount.cpp |
static const Mount& |
add_mount( const char* V_mount_point, const char* P_real_path, Handle archive, uint flags, uint pri )
See vfs_mount.cpp |
static LibError |
add_path_cb( const char* component, bool is_dir, void* ctx )
See vfs_tree.cpp |
static LibError |
afile_cb( const char* atom_fn, const struct stat* s, uintptr_t memento, uintptr_t user )
See vfs_mount.cpp |
LibError |
afile_close( File* f )
sync and async I/O uses file_* and inf_*. |
LibError |
afile_io_discard( FileIo* io )
See archive.cpp |
int |
afile_io_has_completed( FileIo* io )
See archive.cpp |
LibError |
afile_io_issue( File* f, off_t user_ofs, size_t max_output_size, void* user_buf, FileIo* io )
See archive.cpp |
LibError |
afile_io_validate( const FileIo* io )
See archive.cpp |
LibError |
afile_io_wait( FileIo* io, void*& buf, size_t& size )
See archive.cpp |
LibError |
afile_map( File* f, void*& p, size_t& size )
See archive.cpp |
LibError |
afile_open( const Handle ha, const char* fn, uintptr_t memento, uint flags, File* f )
See archive.cpp |
LibError |
afile_open_vfs( const char* fn, uint flags, TFile* tf, File* f )
See vfs_redirector.cpp |
ssize_t |
afile_read( File* f, off_t ofs, size_t size, FileIOBuf* pbuf, FileIOCB cb, uintptr_t cb_ctx )
file mapping |
LibError |
afile_stat( Handle ha, const char* fn, struct stat* s )
See archive.cpp |
LibError |
afile_unmap( File* f )
See archive.cpp |
LibError |
afile_validate( const File* f )
See archive.cpp |
LibError |
archive_add_file( Archive* a, const ArchiveEntry* ent )
afile_*: file from Zip archive uses lookup to get file information; holds inflate state. |
LibError |
archive_allocate_entries( Archive* a, size_t num_entries )
See archive.cpp |
LibError |
archive_build( const char* P_archive_filename, Filenames V_fns )
See archive_builder.cpp |
void |
archive_build_cancel( ArchiveBuildState* ab )
See archive_builder.cpp |
int |
archive_build_continue( ArchiveBuildState* ab )
See archive_builder.cpp |
LibError |
archive_build_init( const char* P_archive_filename, Filenames V_fns, ArchiveBuildState* ab )
See archive_builder.cpp |
LibError |
archive_close( Handle& ha )
See archive.cpp |
static void |
Archive_dtor( Archive* a )
See archive.cpp |
LibError |
archive_enum( const Handle ha, const FileCB cb, const uintptr_t user )
See archive.cpp |
static LibError |
archive_get_file_info( Archive* a, const char* fn, uintptr_t memento, ArchiveEntry*& ent )
See archive.cpp |
static void |
Archive_init( Archive*, va_list )
See archive.cpp |
static bool |
archive_less( Handle hza1, Handle hza2 )
See vfs_mount.cpp |
Handle |
archive_open( const char* fn )
See archive.cpp |
static LibError |
Archive_reload( Archive* a, const char* fn, Handle )
See archive.cpp |
static LibError |
Archive_to_string( const Archive* a, char* buf )
See archive.cpp |
static LibError |
Archive_validate( const Archive* a )
See archive.cpp |
void* |
block_cache_alloc( BlockId id )
See file_cache.cpp |
void* |
block_cache_find( BlockId id )
See file_cache.cpp |
BlockId |
block_cache_make_id( const char* atom_fn, const off_t ofs )
See file_cache.cpp |
void |
block_cache_mark_completed( BlockId id )
See file_cache.cpp |
void |
block_cache_release( BlockId id )
See file_cache.cpp |
bool |
block_eq( BlockId b1, BlockId b2 )
See file_cache.cpp |
static LibError |
build_mini_archive( const char* mini_archive_fn_fmt )
See vfs_optimizer.cpp |
static FileIOBuf |
cache_alloc( size_t size )
See file_cache.cpp |
static void |
cache_free( FileIOBuf exact_buf, size_t exact_size )
See file_cache.cpp |
static bool |
can_ignore_reload( const char* V_path, PathList pending_reloads, uint num_pending )
See vfs.cpp |
|
cassert( LFH_SIZE == 30 )
See zip.cpp |
|
cassert( CDFH_SIZE == 46 )
See zip.cpp |
|
cassert( ECDR_SIZE == 22 )
See zip.cpp |
static void |
cdfh_assemble( CDFH* dst_cdfh_le, CompressionMethod method, time_t mtime, u32 crc, size_t csize, size_t ucsize, size_t fn_len, size_t slack, u32 lfh_ofs )
See zip.cpp |
static void |
cdfh_decompose( const CDFH* cdfh_le, CompressionMethod& method, time_t& mtime, off_t& csize, off_t& ucsize, const char*& fn, off_t& lfh_ofs, size_t& total_size )
See zip.cpp |
static FileId |
cid_first( ConnectionId id )
See vfs_optimizer.cpp |
static ConnectionId |
cid_make( FileId first, FileId second )
See vfs_optimizer.cpp |
static FileId |
cid_second( ConnectionId id )
See vfs_optimizer.cpp |
uintptr_t |
comp_alloc( ContextType type, CompressionMethod method )
See compression.cpp |
LibError |
comp_alloc_output( uintptr_t c_, size_t in_size )
See compression.cpp |
ssize_t |
comp_feed( uintptr_t c_, const void* in, size_t in_size )
See compression.cpp |
LibError |
comp_finish( uintptr_t c_, void** out, size_t* out_size )
See compression.cpp |
void |
comp_free( uintptr_t c_ )
See compression.cpp |
void* |
comp_get_output( uintptr_t c_ )
See compression.cpp |
LibError |
comp_reset( uintptr_t c_ )
See compression.cpp |
void |
comp_set_output( uintptr_t c_, void* out, size_t out_size )
See compression.cpp |
static LibError |
compress_cb( uintptr_t cb_ctx, const void* block, size_t size, size_t* bytes_processed )
See archive_builder.cpp |
static LibError |
convert_path( char* dst, const char* src, Conversion conv = TO_NATIVE )
See path.cpp |
static LibError |
decompressor_feed_cb( uintptr_t cb_ctx, const void* cblock, size_t csize, size_t* bytes_processed )
See archive.cpp |
LibError |
dir_close( DirIterator* di )
See file.cpp |
LibError |
dir_create( const char* P_path )
See file.cpp |
LibError |
dir_delete( const char* P_path )
See file.cpp |
bool |
dir_exists( const char* P_path )
See file.cpp |
LibError |
dir_filtered_next_ent( DirIterator* di, DirEnt* ent, const char* filter )
See file_util.cpp |
LibError |
dir_next_ent( DirIterator* di, DirEnt* ent )
See file.cpp |
LibError |
dir_open( const char* P_path, DirIterator* di )
See file.cpp |
static bool |
dirent_less( const DirEnt& d1, const DirEnt& d2 )
========================================================================= File : file_util. |
static void |
displayR( TDir* td, int indent_level )
See vfs_tree.cpp |
static void |
ecdr_assemble( ECDR* dst_ecdr_le, uint cd_entries, off_t cd_ofs, size_t cd_size )
See zip.cpp |
static void |
ecdr_decompose( ECDR* ecdr_le, uint& cd_entries, off_t& cd_ofs, size_t& cd_size )
See zip.cpp |
static LibError |
enqueue_archive( const char* name, const char* P_archive_dir, Archives* archives )
See vfs_mount.cpp |
static LibError |
enqueue_dir( TDir* parent_td, const char* name, const char* P_parent_path, DirQueue* dir_queue )
See vfs_mount.cpp |
|
ERROR_ASSOCIATE( ERR::TNODE_NOT_FOUND,"File/directory not found", ENOENT )
========================================================================= File : vfs_tree. |
|
ERROR_ASSOCIATE( ERR::ROOT_DIR_ALREADY_SET,"Attempting to set FS root dir more than once",-1 )
========================================================================= File : path. |
|
ERROR_ASSOCIATE( ERR::DIR_END,"End of directory reached (no more files)",-1 )
See file.cpp |
|
ERROR_ASSOCIATE( ERR::IO_EOF,"Reading beyond end of file",-1 )
See file_io.cpp |
|
ERROR_ASSOCIATE( ERR::COMPRESSION_UNKNOWN_METHOD,"Unknown/unsupported compression method",-1 )
========================================================================= File : compression. |
|
ERROR_ASSOCIATE( ERR::TRACE_EMPTY,"No valid entries in trace",-1 )
========================================================================= File : trace. |
|
ERROR_ASSOCIATE( ERR::FILE_NOT_MAPPED,"File was not mapped",-1 )
See file.cpp |
|
ERROR_ASSOCIATE( ERR::TNODE_WRONG_TYPE,"Using a directory as file or vice versa",-1 )
See vfs_tree.cpp |
|
ERROR_ASSOCIATE( ERR::FILE_ACCESS,"Insufficient access rights to open file", EACCES )
========================================================================= File : file. |
|
ERROR_ASSOCIATE( ERR::IS_COMPRESSED,"Invalid operation for a compressed file",-1 )
lookup_*: file lookup per archive: return file info (e.g. offset, size), given filename. |
|
ERROR_ASSOCIATE( ERR::IO,"Error during IO", EIO )
========================================================================= File : file_io. |
u32 |
FAT_from_time_t( time_t time )
See zip.cpp |
void |
file_buf_add_padding( FileIOBuf exact_buf, size_t exact_size, size_t padding )
See file_cache.cpp |
FileIOBuf |
file_buf_alloc( size_t size, const char* atom_fn, uint fb_flags )
See file_cache.cpp |
LibError |
file_buf_free( FileIOBuf buf, uint fb_flags )
See file_cache.cpp |
LibError |
file_buf_set_real_fn( FileIOBuf buf, const char* atom_fn )
See file_cache.cpp |
LibError |
file_cache_add( FileIOBuf buf, size_t size, const char* atom_fn, uint file_flags )
See file_cache.cpp |
void* |
file_cache_allocator_alloc( size_t size )
See file_cache.cpp |
void |
file_cache_allocator_free( u8* p, size_t size )
See file_cache.cpp |
void |
file_cache_allocator_reset()
See file_cache.cpp |
void |
file_cache_init()
See file_cache.cpp |
LibError |
file_cache_invalidate( const char* P_fn )
See file_cache.cpp |
void |
file_cache_reset()
See file_cache.cpp |
FileIOBuf |
file_cache_retrieve( const char* atom_fn, size_t* psize, uint fb_flags )
See file_cache.cpp |
void |
file_cache_shutdown()
See file_cache.cpp |
bool |
file_cache_would_add( size_t size, const char* UNUSED( atom_fn ), uint file_flags )
See file_cache.cpp |
LibError |
file_close( File* f )
memory mapping |
LibError |
file_delete( const char* fn )
file open/close stores information about file (e.g. size) in File struct |
LibError |
file_enum( const char* P_path, const FileCB cb, const uintptr_t user )
See file_util.cpp |
bool |
file_exists( const char* fn )
See file.cpp |
int |
file_fd_from_PosixFile( File* f )
See file.cpp |
const char* |
file_get_random_name()
See path.cpp |
LibError |
file_get_sorted_dirents( const char* P_path, DirEnts& dirents )
See file_util.cpp |
LibError |
file_init()
See file.cpp |
ssize_t |
file_io( File* f, off_t ofs, size_t size, FileIOBuf* pbuf, FileIOCB cb, uintptr_t ctx )
See file_io.cpp |
LibError |
file_io_call_back( const void* block, size_t size, FileIOCB cb, uintptr_t ctx, size_t& bytes_processed )
See file_io.cpp |
LibError |
file_io_discard( FileIo* io )
See file_io.cpp |
LibError |
file_io_get_buf( FileIOBuf* pbuf, size_t size, const char* atom_fn, uint file_flags, FileIOCB cb )
See file_io.cpp |
int |
file_io_has_completed( FileIo* io )
See file_io.cpp |
void |
file_io_init()
See file_io.cpp |
LibError |
file_io_issue( File* f, off_t ofs, size_t size, void* p, FileIo* io )
See file_io.cpp |
void |
file_io_shutdown()
See file_io.cpp |
LibError |
file_io_validate( const FileIo* io )
See file_io.cpp |
LibError |
file_io_wait( FileIo* io, void*& p, size_t& size )
See file_io.cpp |
LibError |
file_make_full_native_path( const char* path, char* n_full_path )
See path.cpp |
LibError |
file_make_full_portable_path( const char* n_full_path, char* path )
See path.cpp |
LibError |
file_make_native_path( const char* path, char* n_path )
See path.cpp |
LibError |
file_make_portable_path( const char* n_path, char* path )
See path.cpp |
const char* |
file_make_unique_fn_copy( const char* P_fn )
See path.cpp |
LibError |
file_map( File* f, void*& p, size_t& size )
See file.cpp |
LibError |
file_open( const char* P_fn, uint flags, File* f )
See file.cpp |
LibError |
file_open_vfs( const char* V_path, uint flags, TFile* tf, File* f )
See vfs_redirector.cpp |
LibError |
file_set_root_dir( const char* argv0, const char* rel_path )
See path.cpp |
LibError |
file_shutdown()
See file.cpp |
LibError |
file_stat( const char* fn, struct stat* s )
See file.cpp |
static LibError |
file_stat_impl( const char* fn, struct stat* s, bool warn_if_failed = true )
See file.cpp |
void |
file_stats_dump()
See file_stats.cpp |
static inline bool |
file_type_is_uncompressible( const char* fn )
========================================================================= File : archive_builder. |
LibError |
file_unmap( File* f )
See file.cpp |
LibError |
file_validate( const File* f )
See file.cpp |
static void |
free_padded_buf( FileIOBuf padded_buf, size_t size, bool from_heap = false )
See file_cache.cpp |
|
H_TYPE_DEFINE( Archive )
See archive.cpp |
|
H_TYPE_DEFINE( VFile )
See vfs.cpp |
|
H_TYPE_DEFINE( VIo )
See vfs.cpp |
|
H_TYPE_DEFINE( VDir )
See vfs.cpp |
static bool |
is_archivable( const TFile* tf )
See vfs_optimizer.cpp |
static inline bool |
is_compressed( ArchiveFile* af )
See archive.cpp |
static void |
lfh_assemble( LFH* lfh_le, CompressionMethod method, time_t mtime, u32 crc, off_t csize, off_t ucsize, size_t fn_len )
See zip.cpp |
static LibError |
lfh_copier_cb( uintptr_t ctx, const void* block, size_t size, size_t* bytes_processed )
See zip.cpp |
static off_t |
lfh_total_size( const LFH* lfh_le )
See zip.cpp |
static LibError |
LibError_from_zlib( int zlib_err, bool warn_if_failed = true )
See compression.cpp |
static LibError |
lookup( TDir* td, const char* path, uint flags, TNode** pnode )
See vfs_tree.cpp |
static LibError |
lookup_cb( const char* component, bool is_dir, void* ctx )
See vfs_tree.cpp |
static CompressionMethod |
method_for_zip_method( ZipCompressionMethod zip_method )
See zip.cpp |
static LibError |
mount_archive( TDir* td, const Mount& m )
See vfs_mount.cpp |
static LibError |
mount_archives( TDir* td, Archives* archives, const Mount* mount )
See vfs_mount.cpp |
LibError |
mount_attach_real_dir( RealDir* rd, const char* P_path, const Mount* m, uint flags )
See vfs_mount.cpp |
LibError |
mount_create_real_dir( const char* V_path, const Mount* m )
See vfs_mount.cpp |
void |
mount_detach_real_dir( RealDir* rd )
See vfs_mount.cpp |
static LibError |
mount_dir_tree( TDir* td_start, const Mount& m )
mount list (allows multiple mountings, e.g. for mods) |
Handle |
mount_get_archive( const Mount* m )
See vfs_mount.cpp |
char |
mount_get_type( const Mount* m )
See vfs_mount.cpp |
void |
mount_init()
See vfs_mount.cpp |
bool |
mount_is_archivable( const Mount* m )
See vfs_mount.cpp |
LibError |
mount_make_vfs_path( const char* P_path, char* V_path )
See vfs_mount.cpp |
LibError |
mount_populate( TDir* td, RealDir* rd )
See vfs_mount.cpp |
LibError |
mount_realpath( const char* V_path, const Mount* m, char* P_real_path )
populate the directory being mounted with files from real subdirectories and archives. |
LibError |
mount_rebuild()
See vfs_mount.cpp |
void |
mount_release_all_archives()
See vfs_mount.cpp |
bool |
mount_should_replace( const Mount* m_old, const Mount* m_new, size_t size_old, size_t size_new, time_t mtime_old, time_t mtime_new )
See vfs_mount.cpp |
void |
mount_shutdown()
See vfs_mount.cpp |
static void |
mount_unmount_all( void )
See vfs_mount.cpp |
void |
next_numbered_filename( const char* fn_fmt, NextNumberedFilenameInfo* nfi, char* next_fn, bool use_vfs )
See file_util.cpp |
static void* |
node_alloc()
See vfs_tree.cpp |
static inline void |
node_free_all()
See vfs_tree.cpp |
static inline void |
node_init()
See vfs_tree.cpp |
static inline void |
node_shutdown()
See vfs_tree.cpp |
void |
path_init()
See path.cpp |
bool |
path_is_atom_fn( const char* fn )
See path.cpp |
void |
path_reset_root_dir()
See path.cpp |
void |
path_shutdown()
See path.cpp |
template< typename T > int |
percent( T num, T divisor )
See file_stats.cpp |
static LibError |
populate_dir( TDir* td, const char* P_path, const Mount* m, DirQueue* dir_queue, Archives* archives, uint flags )
See vfs_mount.cpp |
static LibError |
read_and_compress_file( const char* atom_fn, uintptr_t ctx, ArchiveEntry& ent, void*& file_contents, FileIOBuf& buf )
See archive_builder.cpp |
static LibError |
reload_without_rebuild( const char* fn )
See vfs.cpp |
static LibError |
remount( const Mount& m )
See vfs_mount.cpp |
static inline void |
remount_all()
See vfs_mount.cpp |
static void |
set_most_recent_if_newer( time_t mtime )
See vfs_tree.cpp |
LibError |
set_mount_to_write_target( TFile* tf )
See vfs_mount.cpp |
static bool |
should_build_mini_archive( const char* UNUSED( mini_archive_fn_fmt ) )
See vfs_optimizer.cpp |
static bool |
should_rebuild_main_archive( const char* trace_filename, DirEnts& existing_archives )
See vfs_optimizer.cpp |
static bool |
should_store_compressed( size_t ucsize, size_t csize )
See archive_builder.cpp |
void |
stats_ab_connection( bool already_exists )
See file_stats.cpp |
void |
stats_block_cache( CacheRet cr )
See file_stats.cpp |
void |
stats_buf_alloc( size_t user_size, size_t padded_size )
See file_stats.cpp |
void |
stats_buf_free()
See file_stats.cpp |
void |
stats_buf_ref()
See file_stats.cpp |
void |
stats_cache( CacheRet cr, size_t size, const char* atom_fn )
See file_stats.cpp |
void |
stats_cb_finish()
See file_stats.cpp |
void |
stats_cb_start()
See file_stats.cpp |
void |
stats_close()
See file_stats.cpp |
void |
stats_io_check_seek( const char* atom_fn, u32 block_num )
See file_stats.cpp |
void |
stats_io_sync_finish( FileIOImplentation fi, FileOp fo, ssize_t user_size, double* start_time_storage )
See file_stats.cpp |
void |
stats_io_sync_start( double* start_time_storage )
See file_stats.cpp |
void |
stats_io_user_request( size_t user_size )
See file_stats.cpp |
void |
stats_open( const char* atom_fn, size_t file_size )
See file_stats.cpp |
void |
stats_unique_name( size_t name_len )
See file_stats.cpp |
void |
stats_vfs_file_add( size_t file_size )
See file_stats.cpp |
void |
stats_vfs_file_remove( size_t file_size )
See file_stats.cpp |
void |
stats_vfs_init_finish()
See file_stats.cpp |
void |
stats_vfs_init_start()
See file_stats.cpp |
const char* |
tfile_get_atom_fn( const TFile* tf )
See vfs_tree.cpp |
uintptr_t |
tfile_get_memento( const TFile* tf )
See vfs_tree.cpp |
const Mount* |
tfile_get_mount( const TFile* tf )
See vfs_tree.cpp |
void |
tfile_set_mount( TFile* tf, const Mount* m )
See vfs_tree.cpp |
time_t |
time_t_from_FAT( u32 fat_timedate )
========================================================================= File : zip. |
|
TIMER_ADD_CLIENT( tc_zip_memcpy )
See compression.cpp |
|
TIMER_ADD_CLIENT( tc_zip_inflate )
See compression.cpp |
static double |
timer_reset( double* start_time_storage =& start_time )
See file_stats.cpp |
static void |
timer_start( double* start_time_storage =& start_time )
See file_stats.cpp |
static LibError |
trace_add( TraceOp op, const char* P_fn, size_t size, uint flags = 0, double timestamp = 0. 0 )
See trace.cpp |
void |
trace_clear()
See trace.cpp |
void |
trace_enable( bool want_enabled )
See trace.cpp |
bool |
trace_entry_causes_io( const TraceEntry* ent )
See trace.cpp |
void |
trace_gen_random( size_t num_entries )
See trace.cpp |
void |
trace_get( Trace* t )
See trace.cpp |
static void |
trace_get_raw_ents( const TraceEntry*& ents, size_t& num_ents )
See trace.cpp |
static inline void |
trace_init()
See trace.cpp |
void |
trace_notify_free( const char* P_fn, size_t size )
See trace.cpp |
void |
trace_notify_io( const char* P_fn, size_t size, uint flags )
See trace.cpp |
LibError |
trace_read_from_file( const char* trace_filename, Trace* t )
See trace.cpp |
LibError |
trace_run( const char* trace_filename, uint flags )
See trace.cpp |
void |
trace_shutdown()
See trace.cpp |
LibError |
trace_write_to_file( const char* trace_filename )
See trace.cpp |
LibError |
tree_add_dir( TDir* td, const char* name, TDir** ptd )
See vfs_tree.cpp |
LibError |
tree_add_file( TDir* td, const char* name, const Mount* m, off_t size, time_t mtime, uintptr_t memento )
See vfs_tree.cpp |
LibError |
tree_add_path( const char* V_dir_path, const Mount* m, TDir** ptd )
See vfs_tree.cpp |
void |
tree_clear()
See vfs_tree.cpp |
LibError |
tree_dir_close( DirIterator* UNUSED( d ) )
See vfs_tree.cpp |
LibError |
tree_dir_next_ent( DirIterator* di, DirEnt* ent )
See vfs_tree.cpp |
LibError |
tree_dir_open( const char* V_dir_path, DirIterator* di )
See vfs_tree.cpp |
void |
tree_display()
See vfs_tree.cpp |
RealDir* |
tree_get_real_dir( TDir* td )
See vfs_tree.cpp |
void |
tree_init()
See vfs_tree.cpp |
void |
tree_lock()
See vfs_tree.cpp |
LibError |
tree_lookup( const char* V_path, TFile** pfile, uint flags )
See vfs_tree.cpp |
LibError |
tree_lookup_dir( const char* V_path, TDir** ptd, uint flags )
See vfs_tree.cpp |
time_t |
tree_most_recent_mtime()
See vfs_tree.cpp |
static void |
tree_root_init()
See vfs_tree.cpp |
static void |
tree_root_shutdown()
See vfs_tree.cpp |
void |
tree_shutdown()
See vfs_tree.cpp |
LibError |
tree_stat( const TFile* tf, struct stat* s )
See vfs_tree.cpp |
void |
tree_unlock()
See vfs_tree.cpp |
void |
tree_update_file( TFile* tf, off_t size, time_t mtime )
See vfs_tree.cpp |
static void |
VDir_dtor( VDir* vd )
See vfs.cpp |
static void |
VDir_init( VDir* UNUSED( vd ), va_list UNUSED( args ) )
See vfs.cpp |
static LibError |
VDir_reload( VDir* vd, const char* V_dir_path, Handle UNUSED( hvd ) )
See vfs.cpp |
static LibError |
VDir_to_string( const VDir* vd, char* buf )
See vfs.cpp |
static LibError |
VDir_validate( const VDir* vd )
See vfs.cpp |
static void |
VFile_dtor( VFile* vf )
See vfs.cpp |
static void |
VFile_init( VFile* vf, va_list args )
See vfs.cpp |
static LibError |
VFile_reload( VFile* vf, const char* V_path, Handle )
See vfs.cpp |
static LibError |
VFile_to_string( const VFile* UNUSED( vf ), char* buf )
See vfs.cpp |
static LibError |
VFile_validate( const VFile* vf )
See vfs.cpp |
LibError |
vfs_close( Handle& hf )
See vfs.cpp |
LibError |
vfs_dir_close( Handle& hd )
See vfs.cpp |
LibError |
vfs_dir_enum( const char* start_path, uint flags, const char* user_filter, DirEnumCB cb, void* context )
See file_util.cpp |
LibError |
vfs_dir_next_ent( const Handle hd, DirEnt* ent, const char* filter )
file |
Handle |
vfs_dir_open( const char* V_dir_path )
See vfs.cpp |
void |
vfs_display()
See vfs.cpp |
bool |
vfs_exists( const char* V_fn )
See vfs.cpp |
void |
vfs_init()
See vfs.cpp |
ssize_t |
vfs_io( const Handle hf, const size_t size, FileIOBuf* pbuf, FileIOCB cb, uintptr_t cb_ctx )
See vfs.cpp |
LibError |
vfs_io_discard( Handle& hio )
See vfs.cpp |
int |
vfs_io_has_completed( Handle hio )
See vfs.cpp |
Handle |
vfs_io_issue( Handle hf, size_t size, void* buf )
See vfs.cpp |
LibError |
vfs_io_wait( Handle hio, void*& p, size_t& size )
memory mapping |
LibError |
vfs_load( const char* V_fn, FileIOBuf& buf, size_t& size, uint file_flags, FileIOCB cb, uintptr_t cb_ctx )
See vfs.cpp |
LibError |
vfs_map( const Handle hf, const uint UNUSED( flags ), void*& p, size_t& size )
See vfs.cpp |
LibError |
vfs_mount( const char* V_mount_point, const char* P_real_path, uint flags, uint pri )
See vfs_mount.cpp |
Handle |
vfs_open( const char* V_fn, uint file_flags )
See vfs.cpp |
int |
vfs_opt_auto_build( const char* trace_filename, const char* archive_fn_fmt, const char* mini_archive_fn_fmt, bool force_build )
See vfs_optimizer.cpp |
void |
vfs_opt_auto_build_cancel()
See vfs_optimizer.cpp |
static int |
vfs_opt_continue()
See vfs_optimizer.cpp |
static LibError |
vfs_opt_init( const char* trace_filename, const char* archive_fn_fmt, bool force_build )
See vfs_optimizer.cpp |
void |
vfs_opt_notify_loose_file( const char* atom_fn )
See vfs_optimizer.cpp |
void |
vfs_opt_notify_non_loose_file( const char* atom_fn )
See vfs_optimizer.cpp |
LibError |
vfs_opt_rebuild_main_archive( const char* trace_filename, const char* archive_fn_fmt )
See vfs_optimizer.cpp |
LibError |
vfs_realpath( const char* V_path, char* realpath )
See vfs.cpp |
LibError |
vfs_reload( const char* fn )
See vfs.cpp |
LibError |
vfs_reload_changed_files()
See vfs.cpp |
LibError |
vfs_set_write_target( const char* P_target_dir )
See vfs_mount.cpp |
void |
vfs_shutdown()
See vfs.cpp |
ssize_t |
vfs_size( Handle hf )
See vfs.cpp |
LibError |
vfs_stat( const char* V_path, struct stat* s )
See vfs.cpp |
ssize_t |
vfs_store( const char* V_fn, const void* p, const size_t size, uint flags )
asynchronous I/O |
LibError |
vfs_unmap( const Handle hf )
See vfs.cpp |
LibError |
vfs_unmount( const char* P_name )
See vfs_mount.cpp |
static void |
VIo_dtor( VIo* vio )
See vfs.cpp |
static void |
VIo_init( VIo* vio, va_list args )
See vfs.cpp |
static LibError |
VIo_reload( VIo* vio, const char* UNUSED( fn ), Handle UNUSED( h ) )
See vfs.cpp |
static LibError |
VIo_to_string( const VIo* vio, char* buf )
See vfs.cpp |
static LibError |
VIo_validate( const VIo* vio )
See vfs.cpp |
static LibError |
vtbl_validate( const FileProvider_VTbl* vtbl )
See vfs_redirector.cpp |
static void |
write_entry( FILE* f, const TraceEntry* ent )
See trace.cpp |
LibError |
xdir_close( DirIterator* di )
See vfs_redirector.cpp |
LibError |
xdir_next_ent( DirIterator* di, DirEnt* ent )
See vfs_redirector.cpp |
LibError |
xdir_open( const char* dir, DirIterator* di )
See vfs_redirector.cpp |
LibError |
xfile_close( File* f )
See vfs_redirector.cpp |
ssize_t |
xfile_io( File* f, off_t ofs, size_t size, FileIOBuf* pbuf, FileIOCB cb, uintptr_t ctx )
See vfs_redirector.cpp |
LibError |
xfile_io_discard( FileIo* io )
See vfs_redirector.cpp |
int |
xfile_io_has_completed( FileIo* io )
See vfs_redirector.cpp |
LibError |
xfile_io_issue( File* f, off_t ofs, size_t size, void* buf, FileIo* io )
See vfs_redirector.cpp |
LibError |
xfile_io_validate( const FileIo* io )
See vfs_redirector.cpp |
LibError |
xfile_io_wait( FileIo* io, void*& p, size_t& size )
See vfs_redirector.cpp |
bool |
xfile_is_open( const File* f )
See vfs_redirector.cpp |
LibError |
xfile_map( File* f, void*& p, size_t& size )
See vfs_redirector.cpp |
LibError |
xfile_open( const char* V_path, uint flags, TFile* tf, File* f )
See vfs_redirector.cpp |
LibError |
xfile_unmap( File* f )
See vfs_redirector.cpp |
LibError |
xfile_validate( const File* f )
See vfs_redirector.cpp |
static LibError |
za_find_cd( File* f, uint& cd_entries, off_t& cd_ofs, size_t& cd_size )
See zip.cpp |
static LibError |
za_find_ecdr( File* f, size_t max_scan_amount, ECDR* dst_ecdr_le )
See zip.cpp |
static const u8* |
za_find_id( const u8* buf, size_t size, const void* start, u32 magic, size_t record_size )
See zip.cpp |
LibError |
zip_archive_add_file( ZipArchive* za, const ArchiveEntry* ae, void* file_contents )
See zip.cpp |
LibError |
zip_archive_create( const char* zip_filename, ZipArchive** pza )
See zip.cpp |
LibError |
zip_archive_finish( ZipArchive* za )
See zip.cpp |
void |
zip_fixup_lfh( File* f, ArchiveEntry* ent )
See zip.cpp |
static ZipCompressionMethod |
zip_method_for( CompressionMethod method )
See zip.cpp |
LibError |
zip_populate_archive( File* f, Archive* a )
See zip.cpp |
Macro Summary | |
#define |
CHECK_AFILE(f) RETURN_ERR(afile_validate(f))
See archive.cpp |
#define |
CHECK_FILE(f) RETURN_ERR(file_validate(f))
See file.h |
#define |
CHECK_VTBL(type) RETURN_ERR(vtbl_validate(type))
See vfs_redirector.cpp |
#define |
DIRENT_IS_DIR(p_ent) ((p_ent)->size == -1)
See file.h |
#define |
stats_ab_connection(already_exists)
See file_stats.h |
#define |
stats_block_cache(cr)
See file_stats.h |
#define |
stats_buf_alloc(user_size, padded_size)
See file_stats.h |
#define |
stats_cache(cr, size, atom_fn)
See file_stats.h |
#define |
stats_io_check_seek(atom_fn, block_num)
See file_stats.h |
#define |
stats_io_sync_finish(fi, fo, user_size, start_time_storage)
See file_stats.h |
#define |
stats_io_sync_start(disk_pos, start_time_storage)
See file_stats.h |
#define |
stats_io_user_request(user_size)
See file_stats.h |
#define |
stats_open(atom_fn, file_size)
See file_stats.h |
#define |
stats_unique_name(name_len)
See file_stats.h |
#define |
stats_vfs_file_add(file_size)
See file_stats.h |
#define |
stats_vfs_file_remove(file_size)
See file_stats.h |
#define |
THROUGHPUT(impl, op) (io_elapsed_time[impl][op] == 0.0)? 0.0 : (io_actual_size_total[impl][op] / io_elapsed_time[impl][op] / MB)
See file_stats.cpp |
#define |
VFS_PATH_IS_DIR(path) (*path == '\0' || path[strlen(path)-1] == '/')
See path.h |
Field Detail |
cassert( sizeof( PosixFile )< FILE_OPAQUE_SIZE );
cassert( sizeof( PosixDirIterator ) <;
static ArchiveBuildState ab;
static uint ab_connection_attempts;
static uint ab_repeated_connections;
const size_t AIO_SECTOR_SIZE;
static AiocbAllocator aiocb_allocator;
static char archive_fn[ PATH_MAX ];
static const FileProvider_VTbl archive_vtbl;
static FnSet archived_files;
static AtomMap atom_map;
static Pool atom_pool;
static uint block_cache_count[ 2 ];
static BlockMgr block_mgr;
static const size_t BUF_ALIGN;
static double buf_padded_size_total;
static double buf_user_size_total;
static const ssize_t BUILD_MINI_ARCHIVE_THRESHOLD;
static CacheAllocator cache_allocator;
static uint cache_count[ 2 ];
static double cache_size_total[ 2 ];
static const u32 cdfh_magic;
const size_t CDFH_SIZE;
static const size_t CHUNK_SIZE;
static SingleAllocator< u8[ MAX_COMPRESSOR_SIZE] > compressor_allocator;
static double conflict_miss_size_total;
static uint conflict_misses;
static const TraceEntry delimiter_entry;
const size_t DIR_ITERATOR_OPAQUE_SIZE;
static const u32 ecdr_magic;
const size_t ECDR_SIZE;
static AtomFnSet ever_cached_files;
static ExactBufOracle exact_buf_oracle;
static DirEnts existing_archives;
static ExtantBufMgr extant_bufs;
static uint extant_bufs_cur;
static uint extant_bufs_max;
static uint extant_bufs_total;
const size_t FILE_BLOCK_SIZE;
const FileIOBuf FILE_BUF_ALLOC;
FileIOBuf* const FILE_BUF_TEMP;
static Cache< const void*, FileIOBuf > file_cache;
const size_t FILE_IO_OPAQUE_SIZE;
const size_t FILE_OPAQUE_SIZE;
size_t file_sector_size;
static const FileProvider_VTbl file_vtbl;
static std::vector< const char* > fn_vector;
static IdMgr id_mgr;
static ModuleInitState initState;
static double io_actual_size_total[ FI_MAX_IDX ][ 2 ];
static SingleAllocator< FileIo > io_allocator;
static double io_elapsed_time[ FI_MAX_IDX ][ 2 ];
static double io_process_time_total;
static uint io_seeks;
static const u32 lfh_magic;
const size_t LFH_SIZE;
static FnSet loose_files;
static const size_t MAX_CACHE_SIZE;
static const size_t MAX_COMPRESSOR_SIZE;
static const size_t MAX_IDS;
static const uint MAX_MAP_REFS;
const size_t MAX_RELOADS_PER_FRAME;
static const uint MAX_RUNS;
static time_t most_recent_mtime;
static Mounts mounts;
static const Mount* MULTIPLE_MOUNTINGS;
static pthread_mutex_t mutex;
static char n_root_dir[ PATH_MAX ];
static size_t n_root_dir_len;
static Pool node_pool;
static const FileId NULL_ID;
static uint open_files_cur;
static uint open_files_max;
static double opened_file_size_total;
static AtomFnSet opened_files;
static SingleAllocator< PathPackage > pp_allocator;
static const ssize_t REBUILD_MAIN_ARCHIVE_THRESHOLD;
static bool root_dir_established;
static std::vector< size_t > run_start_indices;
static TraceRun runs[ MAX_RUNS ];
static double start_time;
state;
static bool trace_enabled;
static bool trace_force_enabled;
static uintptr_t trace_initialized;
static Pool trace_pool;
static TDir* tree_root;
static const FileProvider_VTbl tree_vtbl;
static size_t unique_name_len_total;
static uint unique_names;
static double user_io_size_total;
static uint user_ios;
static uint vfs_files;
static double vfs_init_elapsed_time;
static size_t vfs_size_total;
static const u32 vtbl_magic;
static const Mount* write_target;
static SingleAllocator< ZipArchive > za_mgr;
Method Detail |
static LibError add_ent( TDir* td, DirEnt* ent, const char* P_parent_path, const Mount* m, DirQueue* dir_queue, Archives* archives );
static const Mount& add_mount( const char* V_mount_point, const char* P_real_path, Handle archive, uint flags, uint pri );
static LibError add_path_cb( const char* component, bool is_dir, void* ctx );
static LibError afile_cb( const char* atom_fn, const struct stat* s, uintptr_t memento, uintptr_t user );
LibError afile_close( File* f );
LibError afile_io_discard( FileIo* io );
int afile_io_has_completed( FileIo* io );
LibError afile_io_issue( File* f, off_t user_ofs, size_t max_output_size, void* user_buf, FileIo* io );
LibError afile_io_validate( const FileIo* io );
LibError afile_io_wait( FileIo* io, void*& buf, size_t& size );
LibError afile_map( File* f, void*& p, size_t& size );
LibError afile_open( const Handle ha, const char* fn, uintptr_t memento, uint flags, File* f );
LibError afile_open_vfs( const char* fn, uint flags, TFile* tf, File* f );
ssize_t afile_read( File* f, off_t ofs, size_t size, FileIOBuf* pbuf, FileIOCB cb, uintptr_t cb_ctx );
LibError afile_stat( Handle ha, const char* fn, struct stat* s );
LibError afile_unmap( File* f );
LibError afile_validate( const File* f );
LibError archive_add_file( Archive* a, const ArchiveEntry* ent );
LibError archive_allocate_entries( Archive* a, size_t num_entries );
LibError archive_build( const char* P_archive_filename, Filenames V_fns );
void archive_build_cancel( ArchiveBuildState* ab );
int archive_build_continue( ArchiveBuildState* ab );
LibError archive_build_init( const char* P_archive_filename, Filenames V_fns, ArchiveBuildState* ab );
LibError archive_close( Handle& ha );
static void Archive_dtor( Archive* a );
LibError archive_enum( const Handle ha, const FileCB cb, const uintptr_t user );
static LibError archive_get_file_info( Archive* a, const char* fn, uintptr_t memento, ArchiveEntry*& ent );
static void Archive_init( Archive*, va_list );
static bool archive_less( Handle hza1, Handle hza2 );
Handle archive_open( const char* fn );
static LibError Archive_reload( Archive* a, const char* fn, Handle );
static LibError Archive_to_string( const Archive* a, char* buf );
static LibError Archive_validate( const Archive* a );
void* block_cache_alloc( BlockId id );
void* block_cache_find( BlockId id );
BlockId block_cache_make_id( const char* atom_fn, const off_t ofs );
void block_cache_mark_completed( BlockId id );
void block_cache_release( BlockId id );
bool block_eq( BlockId b1, BlockId b2 );
static LibError build_mini_archive( const char* mini_archive_fn_fmt );
static FileIOBuf cache_alloc( size_t size );
static void cache_free( FileIOBuf exact_buf, size_t exact_size );
static bool can_ignore_reload( const char* V_path, PathList pending_reloads, uint num_pending );
cassert( LFH_SIZE == 30 );
cassert( CDFH_SIZE == 46 );
cassert( ECDR_SIZE == 22 );
static void cdfh_assemble( CDFH* dst_cdfh_le, CompressionMethod method, time_t mtime, u32 crc, size_t csize, size_t ucsize, size_t fn_len, size_t slack, u32 lfh_ofs );
static void cdfh_decompose( const CDFH* cdfh_le, CompressionMethod& method, time_t& mtime, off_t& csize, off_t& ucsize, const char*& fn, off_t& lfh_ofs, size_t& total_size );
static FileId cid_first( ConnectionId id );
static ConnectionId cid_make( FileId first, FileId second );
static FileId cid_second( ConnectionId id );
uintptr_t comp_alloc( ContextType type, CompressionMethod method );
LibError comp_alloc_output( uintptr_t c_, size_t in_size );
ssize_t comp_feed( uintptr_t c_, const void* in, size_t in_size );
LibError comp_finish( uintptr_t c_, void** out, size_t* out_size );
void comp_free( uintptr_t c_ );
void* comp_get_output( uintptr_t c_ );
LibError comp_reset( uintptr_t c_ );
void comp_set_output( uintptr_t c_, void* out, size_t out_size );
static LibError compress_cb( uintptr_t cb_ctx, const void* block, size_t size, size_t* bytes_processed );
static LibError convert_path( char* dst, const char* src, Conversion conv = TO_NATIVE );
static LibError decompressor_feed_cb( uintptr_t cb_ctx, const void* cblock, size_t csize, size_t* bytes_processed );
LibError dir_close( DirIterator* di );
LibError dir_create( const char* P_path );
LibError dir_delete( const char* P_path );
bool dir_exists( const char* P_path );
LibError dir_filtered_next_ent( DirIterator* di, DirEnt* ent, const char* filter );
LibError dir_next_ent( DirIterator* di, DirEnt* ent );
LibError dir_open( const char* P_path, DirIterator* di );
static bool dirent_less( const DirEnt& d1, const DirEnt& d2 );
static void displayR( TDir* td, int indent_level );
static void ecdr_assemble( ECDR* dst_ecdr_le, uint cd_entries, off_t cd_ofs, size_t cd_size );
static void ecdr_decompose( ECDR* ecdr_le, uint& cd_entries, off_t& cd_ofs, size_t& cd_size );
static LibError enqueue_archive( const char* name, const char* P_archive_dir, Archives* archives );
static LibError enqueue_dir( TDir* parent_td, const char* name, const char* P_parent_path, DirQueue* dir_queue );
ERROR_ASSOCIATE( ERR::TNODE_NOT_FOUND,"File/directory not found", ENOENT );
ERROR_ASSOCIATE( ERR::ROOT_DIR_ALREADY_SET,"Attempting to set FS root dir more than once",-1 );
ERROR_ASSOCIATE( ERR::DIR_END,"End of directory reached (no more files)",-1 );
ERROR_ASSOCIATE( ERR::IO_EOF,"Reading beyond end of file",-1 );
ERROR_ASSOCIATE( ERR::COMPRESSION_UNKNOWN_METHOD,"Unknown/unsupported compression method",-1 );
ERROR_ASSOCIATE( ERR::TRACE_EMPTY,"No valid entries in trace",-1 );
ERROR_ASSOCIATE( ERR::FILE_NOT_MAPPED,"File was not mapped",-1 );
ERROR_ASSOCIATE( ERR::TNODE_WRONG_TYPE,"Using a directory as file or vice versa",-1 );
ERROR_ASSOCIATE( ERR::FILE_ACCESS,"Insufficient access rights to open file", EACCES );
ERROR_ASSOCIATE( ERR::IS_COMPRESSED,"Invalid operation for a compressed file",-1 );
ERROR_ASSOCIATE( ERR::IO,"Error during IO", EIO );
u32 FAT_from_time_t( time_t time );
void file_buf_add_padding( FileIOBuf exact_buf, size_t exact_size, size_t padding );
FileIOBuf file_buf_alloc( size_t size, const char* atom_fn, uint fb_flags );
LibError file_buf_free( FileIOBuf buf, uint fb_flags );
LibError file_buf_set_real_fn( FileIOBuf buf, const char* atom_fn );
LibError file_cache_add( FileIOBuf buf, size_t size, const char* atom_fn, uint file_flags );
void* file_cache_allocator_alloc( size_t size );
void file_cache_allocator_free( u8* p, size_t size );
void file_cache_allocator_reset();
void file_cache_init();
LibError file_cache_invalidate( const char* P_fn );
void file_cache_reset();
FileIOBuf file_cache_retrieve( const char* atom_fn, size_t* psize, uint fb_flags );
void file_cache_shutdown();
bool file_cache_would_add( size_t size, const char* UNUSED( atom_fn ), uint file_flags );
LibError file_close( File* f );
LibError file_delete( const char* fn );
LibError file_enum( const char* P_path, const FileCB cb, const uintptr_t user );
bool file_exists( const char* fn );
int file_fd_from_PosixFile( File* f );
const char* file_get_random_name();
LibError file_get_sorted_dirents( const char* P_path, DirEnts& dirents );
LibError file_init();
ssize_t file_io( File* f, off_t ofs, size_t size, FileIOBuf* pbuf, FileIOCB cb, uintptr_t ctx );
LibError file_io_call_back( const void* block, size_t size, FileIOCB cb, uintptr_t ctx, size_t& bytes_processed );
LibError file_io_discard( FileIo* io );
LibError file_io_get_buf( FileIOBuf* pbuf, size_t size, const char* atom_fn, uint file_flags, FileIOCB cb );
int file_io_has_completed( FileIo* io );
void file_io_init();
LibError file_io_issue( File* f, off_t ofs, size_t size, void* p, FileIo* io );
void file_io_shutdown();
LibError file_io_validate( const FileIo* io );
LibError file_io_wait( FileIo* io, void*& p, size_t& size );
LibError file_make_full_native_path( const char* path, char* n_full_path );
LibError file_make_full_portable_path( const char* n_full_path, char* path );
LibError file_make_native_path( const char* path, char* n_path );
LibError file_make_portable_path( const char* n_path, char* path );
const char* file_make_unique_fn_copy( const char* P_fn );
LibError file_map( File* f, void*& p, size_t& size );
LibError file_open( const char* P_fn, uint flags, File* f );
LibError file_open_vfs( const char* V_path, uint flags, TFile* tf, File* f );
LibError file_set_root_dir( const char* argv0, const char* rel_path );
LibError file_shutdown();
LibError file_stat( const char* fn, struct stat* s );
static LibError file_stat_impl( const char* fn, struct stat* s, bool warn_if_failed = true );
void file_stats_dump();
static inline bool file_type_is_uncompressible( const char* fn );
LibError file_unmap( File* f );
LibError file_validate( const File* f );
static void free_padded_buf( FileIOBuf padded_buf, size_t size, bool from_heap = false );
H_TYPE_DEFINE( Archive );
H_TYPE_DEFINE( VFile );
H_TYPE_DEFINE( VIo );
H_TYPE_DEFINE( VDir );
static bool is_archivable( const TFile* tf );
static inline bool is_compressed( ArchiveFile* af );
static void lfh_assemble( LFH* lfh_le, CompressionMethod method, time_t mtime, u32 crc, off_t csize, off_t ucsize, size_t fn_len );
static LibError lfh_copier_cb( uintptr_t ctx, const void* block, size_t size, size_t* bytes_processed );
static off_t lfh_total_size( const LFH* lfh_le );
static LibError LibError_from_zlib( int zlib_err, bool warn_if_failed = true );
static LibError lookup( TDir* td, const char* path, uint flags, TNode** pnode );
static LibError lookup_cb( const char* component, bool is_dir, void* ctx );
static CompressionMethod method_for_zip_method( ZipCompressionMethod zip_method );
static LibError mount_archive( TDir* td, const Mount& m );
static LibError mount_archives( TDir* td, Archives* archives, const Mount* mount );
LibError mount_attach_real_dir( RealDir* rd, const char* P_path, const Mount* m, uint flags );
LibError mount_create_real_dir( const char* V_path, const Mount* m );
void mount_detach_real_dir( RealDir* rd );
static LibError mount_dir_tree( TDir* td_start, const Mount& m );
Handle mount_get_archive( const Mount* m );
char mount_get_type( const Mount* m );
void mount_init();
bool mount_is_archivable( const Mount* m );
LibError mount_make_vfs_path( const char* P_path, char* V_path );
LibError mount_populate( TDir* td, RealDir* rd );
LibError mount_realpath( const char* V_path, const Mount* m, char* P_real_path );
LibError mount_rebuild();
void mount_release_all_archives();
bool mount_should_replace( const Mount* m_old, const Mount* m_new, size_t size_old, size_t size_new, time_t mtime_old, time_t mtime_new );
void mount_shutdown();
static void mount_unmount_all( void );
void next_numbered_filename( const char* fn_fmt, NextNumberedFilenameInfo* nfi, char* next_fn, bool use_vfs );
static void* node_alloc();
static inline void node_free_all();
static inline void node_init();
static inline void node_shutdown();
void path_init();
bool path_is_atom_fn( const char* fn );
void path_reset_root_dir();
void path_shutdown();
template< typename T > int percent( T num, T divisor );
static LibError populate_dir( TDir* td, const char* P_path, const Mount* m, DirQueue* dir_queue, Archives* archives, uint flags );
static LibError read_and_compress_file( const char* atom_fn, uintptr_t ctx, ArchiveEntry& ent, void*& file_contents, FileIOBuf& buf );
static LibError reload_without_rebuild( const char* fn );
static LibError remount( const Mount& m );
static inline void remount_all();
static void set_most_recent_if_newer( time_t mtime );
LibError set_mount_to_write_target( TFile* tf );
static bool should_build_mini_archive( const char* UNUSED( mini_archive_fn_fmt ) );
static bool should_rebuild_main_archive( const char* trace_filename, DirEnts& existing_archives );
static bool should_store_compressed( size_t ucsize, size_t csize );
void stats_ab_connection( bool already_exists );
void stats_block_cache( CacheRet cr );
void stats_buf_alloc( size_t user_size, size_t padded_size );
void stats_buf_free();
void stats_buf_ref();
void stats_cache( CacheRet cr, size_t size, const char* atom_fn );
void stats_cb_finish();
void stats_cb_start();
void stats_close();
void stats_io_check_seek( const char* atom_fn, u32 block_num );
void stats_io_sync_finish( FileIOImplentation fi, FileOp fo, ssize_t user_size, double* start_time_storage );
void stats_io_sync_start( double* start_time_storage );
void stats_io_user_request( size_t user_size );
void stats_open( const char* atom_fn, size_t file_size );
void stats_unique_name( size_t name_len );
void stats_vfs_file_add( size_t file_size );
void stats_vfs_file_remove( size_t file_size );
void stats_vfs_init_finish();
void stats_vfs_init_start();
const char* tfile_get_atom_fn( const TFile* tf );
uintptr_t tfile_get_memento( const TFile* tf );
const Mount* tfile_get_mount( const TFile* tf );
void tfile_set_mount( TFile* tf, const Mount* m );
time_t time_t_from_FAT( u32 fat_timedate );
TIMER_ADD_CLIENT( tc_zip_memcpy );
TIMER_ADD_CLIENT( tc_zip_inflate );
static double timer_reset( double* start_time_storage =& start_time );
static void timer_start( double* start_time_storage =& start_time );
static LibError trace_add( TraceOp op, const char* P_fn, size_t size, uint flags = 0, double timestamp = 0. 0 );
void trace_clear();
void trace_enable( bool want_enabled );
bool trace_entry_causes_io( const TraceEntry* ent );
void trace_gen_random( size_t num_entries );
void trace_get( Trace* t );
static void trace_get_raw_ents( const TraceEntry*& ents, size_t& num_ents );
static inline void trace_init();
void trace_notify_free( const char* P_fn, size_t size );
void trace_notify_io( const char* P_fn, size_t size, uint flags );
LibError trace_read_from_file( const char* trace_filename, Trace* t );
LibError trace_run( const char* trace_filename, uint flags );
void trace_shutdown();
LibError trace_write_to_file( const char* trace_filename );
LibError tree_add_dir( TDir* td, const char* name, TDir** ptd );
LibError tree_add_file( TDir* td, const char* name, const Mount* m, off_t size, time_t mtime, uintptr_t memento );
LibError tree_add_path( const char* V_dir_path, const Mount* m, TDir** ptd );
void tree_clear();
LibError tree_dir_close( DirIterator* UNUSED( d ) );
LibError tree_dir_next_ent( DirIterator* di, DirEnt* ent );
LibError tree_dir_open( const char* V_dir_path, DirIterator* di );
void tree_display();
RealDir* tree_get_real_dir( TDir* td );
void tree_init();
void tree_lock();
LibError tree_lookup( const char* V_path, TFile** pfile, uint flags );
LibError tree_lookup_dir( const char* V_path, TDir** ptd, uint flags );
time_t tree_most_recent_mtime();
static void tree_root_init();
static void tree_root_shutdown();
void tree_shutdown();
LibError tree_stat( const TFile* tf, struct stat* s );
void tree_unlock();
void tree_update_file( TFile* tf, off_t size, time_t mtime );
static void VDir_dtor( VDir* vd );
static void VDir_init( VDir* UNUSED( vd ), va_list UNUSED( args ) );
static LibError VDir_reload( VDir* vd, const char* V_dir_path, Handle UNUSED( hvd ) );
static LibError VDir_to_string( const VDir* vd, char* buf );
static LibError VDir_validate( const VDir* vd );
static void VFile_dtor( VFile* vf );
static void VFile_init( VFile* vf, va_list args );
static LibError VFile_reload( VFile* vf, const char* V_path, Handle );
static LibError VFile_to_string( const VFile* UNUSED( vf ), char* buf );
static LibError VFile_validate( const VFile* vf );
LibError vfs_close( Handle& hf );
LibError vfs_dir_close( Handle& hd );
LibError vfs_dir_enum( const char* start_path, uint flags, const char* user_filter, DirEnumCB cb, void* context );
LibError vfs_dir_next_ent( const Handle hd, DirEnt* ent, const char* filter );
Handle vfs_dir_open( const char* V_dir_path );
void vfs_display();
bool vfs_exists( const char* V_fn );
void vfs_init();
ssize_t vfs_io( const Handle hf, const size_t size, FileIOBuf* pbuf, FileIOCB cb, uintptr_t cb_ctx );
LibError vfs_io_discard( Handle& hio );
int vfs_io_has_completed( Handle hio );
Handle vfs_io_issue( Handle hf, size_t size, void* buf );
LibError vfs_io_wait( Handle hio, void*& p, size_t& size );
LibError vfs_load( const char* V_fn, FileIOBuf& buf, size_t& size, uint file_flags, FileIOCB cb, uintptr_t cb_ctx );
LibError vfs_map( const Handle hf, const uint UNUSED( flags ), void*& p, size_t& size );
LibError vfs_mount( const char* V_mount_point, const char* P_real_path, uint flags, uint pri );
Handle vfs_open( const char* V_fn, uint file_flags );
int vfs_opt_auto_build( const char* trace_filename, const char* archive_fn_fmt, const char* mini_archive_fn_fmt, bool force_build );
void vfs_opt_auto_build_cancel();
static int vfs_opt_continue();
static LibError vfs_opt_init( const char* trace_filename, const char* archive_fn_fmt, bool force_build );
void vfs_opt_notify_loose_file( const char* atom_fn );
void vfs_opt_notify_non_loose_file( const char* atom_fn );
LibError vfs_opt_rebuild_main_archive( const char* trace_filename, const char* archive_fn_fmt );
LibError vfs_realpath( const char* V_path, char* realpath );
LibError vfs_reload( const char* fn );
LibError vfs_reload_changed_files();
LibError vfs_set_write_target( const char* P_target_dir );
void vfs_shutdown();
ssize_t vfs_size( Handle hf );
LibError vfs_stat( const char* V_path, struct stat* s );
ssize_t vfs_store( const char* V_fn, const void* p, const size_t size, uint flags );
LibError vfs_unmap( const Handle hf );
LibError vfs_unmount( const char* P_name );
static void VIo_dtor( VIo* vio );
static void VIo_init( VIo* vio, va_list args );
static LibError VIo_reload( VIo* vio, const char* UNUSED( fn ), Handle UNUSED( h ) );
static LibError VIo_to_string( const VIo* vio, char* buf );
static LibError VIo_validate( const VIo* vio );
static LibError vtbl_validate( const FileProvider_VTbl* vtbl );
static void write_entry( FILE* f, const TraceEntry* ent );
LibError xdir_close( DirIterator* di );
LibError xdir_next_ent( DirIterator* di, DirEnt* ent );
LibError xdir_open( const char* dir, DirIterator* di );
LibError xfile_close( File* f );
ssize_t xfile_io( File* f, off_t ofs, size_t size, FileIOBuf* pbuf, FileIOCB cb, uintptr_t ctx );
LibError xfile_io_discard( FileIo* io );
int xfile_io_has_completed( FileIo* io );
LibError xfile_io_issue( File* f, off_t ofs, size_t size, void* buf, FileIo* io );
LibError xfile_io_validate( const FileIo* io );
LibError xfile_io_wait( FileIo* io, void*& p, size_t& size );
bool xfile_is_open( const File* f );
LibError xfile_map( File* f, void*& p, size_t& size );
LibError xfile_open( const char* V_path, uint flags, TFile* tf, File* f );
LibError xfile_unmap( File* f );
LibError xfile_validate( const File* f );
static LibError za_find_cd( File* f, uint& cd_entries, off_t& cd_ofs, size_t& cd_size );
static LibError za_find_ecdr( File* f, size_t max_scan_amount, ECDR* dst_ecdr_le );
static const u8* za_find_id( const u8* buf, size_t size, const void* start, u32 magic, size_t record_size );
LibError zip_archive_add_file( ZipArchive* za, const ArchiveEntry* ae, void* file_contents );
LibError zip_archive_create( const char* zip_filename, ZipArchive** pza );
LibError zip_archive_finish( ZipArchive* za );
void zip_fixup_lfh( File* f, ArchiveEntry* ent );
static ZipCompressionMethod zip_method_for( CompressionMethod method );
LibError zip_populate_archive( File* f, Archive* a );
Symbol Detail |
#define AB_COMPARE_MTIME 1
#define AB_COUNT_LOOSE_FILES 1
#define file_stats_dump
#define FILE_STATS_ENABLED 1
#define INCLUDED_ARCHIVE
#define INCLUDED_ARCHIVE_BUILDER
#define INCLUDED_COMPRESSION
#define INCLUDED_FILE
#define INCLUDED_FILE_CACHE
#define INCLUDED_FILE_IO
#define INCLUDED_FILE_STATS
#define INCLUDED_PATH
#define INCLUDED_TRACE
#define INCLUDED_VFS
#define INCLUDED_VFS_MOUNT
#define INCLUDED_VFS_OPTIMIZER
#define INCLUDED_VFS_REDIRECTOR
#define INCLUDED_VFS_TREE
#define INCLUDED_ZIP
#define stats_buf_free
#define stats_buf_ref
#define stats_cb_finish
#define stats_cb_start
#define stats_close
#define stats_vfs_init_finish
#define stats_vfs_init_start
#define VFS_MAX_FILES ((1u << 16) - 1)
Macro Detail |
#define CHECK_AFILE(f) RETURN_ERR(afile_validate(f))
#define CHECK_FILE(f) RETURN_ERR(file_validate(f))
#define CHECK_VTBL(type) RETURN_ERR(vtbl_validate(type))
#define DIRENT_IS_DIR(p_ent) ((p_ent)->size == -1)
#define stats_ab_connection(already_exists)
#define stats_block_cache(cr)
#define stats_buf_alloc(user_size, padded_size)
#define stats_cache(cr, size, atom_fn)
#define stats_io_check_seek(atom_fn, block_num)
#define stats_io_sync_finish(fi, fo, user_size, start_time_storage)
#define stats_io_sync_start(disk_pos, start_time_storage)
#define stats_io_user_request(user_size)
#define stats_open(atom_fn, file_size)
#define stats_unique_name(name_len)
#define stats_vfs_file_add(file_size)
#define stats_vfs_file_remove(file_size)
#define THROUGHPUT(impl, op) (io_elapsed_time[impl][op] == 0.0)? 0.0 : (io_actual_size_total[impl][op] / io_elapsed_time[impl][op] / MB)
#define VFS_PATH_IS_DIR(path) (*path == '\0' || path[strlen(path)-1] == '/')
|
0 A.D.
Generated on September 04, 2007 at 18:13 CppDoc v2.4.0 |
|||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |