Overview   Project   Class   Tree   Deprecated   Index 
0 A.D.
FRAMES    NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD

lib.res.file
(lib.res.file globals)

   in archive.h
   in archive_builder.h
   in compression.h
   in file.h
   in file_cache.h
   in file_io.h
   in file_stats.h
   in path.h
   in trace.h
   in vfs.h
   in vfs_mount.h
   in vfs_optimizer.h
   in vfs_redirector.h
   in vfs_tree.h
   in zip.h
   in file.h
   in file_internal.h
   in file_io.h
   in archive.cpp
   in file_stats.cpp
   in vfs_optimizer.cpp
   in vfs_redirector.cpp
   in archive.cpp
   in archive_builder.cpp
   in compression.cpp
   in file.cpp
   in file_cache.cpp
   in file_io.cpp
   in file_stats.cpp
   in file_util.cpp
   in path.cpp
   in trace.cpp
   in vfs.cpp
   in vfs_mount.cpp
   in vfs_optimizer.cpp
   in vfs_redirector.cpp
   in vfs_tree.cpp
   in zip.cpp

(lib.res.file globals)


Field Summary
 cassert( sizeof( PosixFile )< FILE_OPAQUE_SIZE )
          See file.cpp
 cassert( sizeof( PosixDirIterator ) <
          See archive.cpp
 static ArchiveBuildState ab
          See vfs_optimizer.cpp
 static uint ab_connection_attempts
          See file_stats.cpp
 static uint ab_repeated_connections
          See file_stats.cpp
 const size_t AIO_SECTOR_SIZE
          ========================================================================= File : file_internal.
 static AiocbAllocator aiocb_allocator
          See file_io.cpp
 static char[ PATH_MAX ] archive_fn
          See vfs_optimizer.cpp
 static const FileProvider_VTbl archive_vtbl
          See vfs_redirector.cpp
 static FnSet archived_files
          See vfs_optimizer.cpp
 static AtomMap atom_map
          See path.cpp
 static Pool atom_pool
          See path.cpp
 static uint[ 2 ] block_cache_count
          See file_stats.cpp
 static BlockMgr block_mgr
          See file_cache.cpp
 static const size_t BUF_ALIGN
          See file_cache.cpp
 static double buf_padded_size_total
          See file_stats.cpp
 static double buf_user_size_total
          See file_stats.cpp
 static const ssize_t BUILD_MINI_ARCHIVE_THRESHOLD
          See vfs_optimizer.cpp
 static CacheAllocator cache_allocator
          See file_cache.cpp
 static uint[ 2 ] cache_count
          See file_stats.cpp
 static double[ 2 ] cache_size_total
          See file_stats.cpp
 static const u32 cdfh_magic
          See zip.cpp
 const size_t CDFH_SIZE
          See zip.cpp
 static const size_t CHUNK_SIZE
          See archive.cpp
 static SingleAllocator< u8[ MAX_COMPRESSOR_SIZE] > compressor_allocator
          See compression.cpp
 static double conflict_miss_size_total
          See file_stats.cpp
 static uint conflict_misses
          See file_stats.cpp
 static const TraceEntry delimiter_entry
          See trace.cpp
 const size_t DIR_ITERATOR_OPAQUE_SIZE
          See file.h
 static const u32 ecdr_magic
          See zip.cpp
 const size_t ECDR_SIZE
          See zip.cpp
 static AtomFnSet ever_cached_files
          See file_stats.cpp
 static ExactBufOracle exact_buf_oracle
          See file_cache.cpp
 static DirEnts existing_archives
          See vfs_optimizer.cpp
 static ExtantBufMgr extant_bufs
          See file_cache.cpp
 static uint extant_bufs_cur
          See file_stats.cpp
 static uint extant_bufs_max
          See file_stats.cpp
 static uint extant_bufs_total
          See file_stats.cpp
 const size_t FILE_BLOCK_SIZE
          See file_internal.h
 const FileIOBuf FILE_BUF_ALLOC
          See file_io.h
 FileIOBuf* const FILE_BUF_TEMP
          See file_io.h
 static Cache< const void*, FileIOBuf > file_cache
          See file_cache.cpp
 const size_t FILE_IO_OPAQUE_SIZE
          See file_io.h
 const size_t FILE_OPAQUE_SIZE
          See file.h
 size_t file_sector_size
          See file_io.cpp
 static const FileProvider_VTbl file_vtbl
          See vfs_redirector.cpp
 static std::vector< const char* > fn_vector
          See vfs_optimizer.cpp
 static IdMgr id_mgr
          See vfs_optimizer.cpp
 static ModuleInitState initState
          See path.cpp
 static double[ FI_MAX_IDX ][ 2 ] io_actual_size_total
          See file_stats.cpp
 static SingleAllocator< FileIo > io_allocator
          See archive.cpp
 static double[ FI_MAX_IDX ][ 2 ] io_elapsed_time
          See file_stats.cpp
 static double io_process_time_total
          See file_stats.cpp
 static uint io_seeks
          See file_stats.cpp
 static const u32 lfh_magic
          See zip.cpp
 const size_t LFH_SIZE
          See zip.cpp
 static FnSet loose_files
          See vfs_optimizer.cpp
 static const size_t MAX_CACHE_SIZE
          See file_cache.cpp
 static const size_t MAX_COMPRESSOR_SIZE
          See compression.cpp
 static const size_t MAX_IDS
          See vfs_optimizer.cpp
 static const uint MAX_MAP_REFS
          See file.cpp
 const size_t MAX_RELOADS_PER_FRAME
          See vfs.cpp
 static const uint MAX_RUNS
          See trace.cpp
 static time_t most_recent_mtime
          See vfs_tree.cpp
 static Mounts mounts
          See vfs_mount.cpp
 static const Mount* MULTIPLE_MOUNTINGS
          See vfs_mount.cpp
 static pthread_mutex_t mutex
          See vfs_tree.cpp
 static char[ PATH_MAX ] n_root_dir
          See path.cpp
 static size_t n_root_dir_len
          See path.cpp
 static Pool node_pool
          See vfs_tree.cpp
 static const FileId NULL_ID
          See vfs_optimizer.cpp
 static uint open_files_cur
          See file_stats.cpp
 static uint open_files_max
          See file_stats.cpp
 static double opened_file_size_total
          See file_stats.cpp
 static AtomFnSet opened_files
          See file_stats.cpp
 static SingleAllocator< PathPackage > pp_allocator
          See file.cpp
 static const ssize_t REBUILD_MAIN_ARCHIVE_THRESHOLD
          See vfs_optimizer.cpp
 static bool root_dir_established
          See path.cpp
 static std::vector< size_t > run_start_indices
          See trace.cpp
 static TraceRun[ MAX_RUNS ] runs
          See trace.cpp
 static double start_time
          See file_stats.cpp
  state
          See vfs_optimizer.cpp
 static bool trace_enabled
          See trace.cpp
 static bool trace_force_enabled
          See trace.cpp
 static uintptr_t trace_initialized
          See trace.cpp
 static Pool trace_pool
          See trace.cpp
 static TDir* tree_root
          See vfs_tree.cpp
 static const FileProvider_VTbl tree_vtbl
          See vfs_redirector.cpp
 static size_t unique_name_len_total
          See file_stats.cpp
 static uint unique_names
          See file_stats.cpp
 static double user_io_size_total
          See file_stats.cpp
 static uint user_ios
          See file_stats.cpp
 static uint vfs_files
          See file_stats.cpp
 static double vfs_init_elapsed_time
          See file_stats.cpp
 static size_t vfs_size_total
          See file_stats.cpp
 static const u32 vtbl_magic
          ========================================================================= File : vfs_redirector.
 static const Mount* write_target
          See vfs_mount.cpp
 static SingleAllocator< ZipArchive > za_mgr
          See zip.cpp
 
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
 
Symbol Summary
 #define AB_COMPARE_MTIME 1
          See vfs_optimizer.cpp
 #define AB_COUNT_LOOSE_FILES 1
          See vfs_optimizer.cpp
 #define file_stats_dump
          See file_stats.h
 #define FILE_STATS_ENABLED 1
          See file_stats.h
 #define INCLUDED_ARCHIVE
          See archive.h
 #define INCLUDED_ARCHIVE_BUILDER
          See archive_builder.h
 #define INCLUDED_COMPRESSION
          See compression.h
 #define INCLUDED_FILE
          See file.h
 #define INCLUDED_FILE_CACHE
          See file_cache.h
 #define INCLUDED_FILE_IO
          See file_io.h
 #define INCLUDED_FILE_STATS
          See file_stats.h
 #define INCLUDED_PATH
          See path.h
 #define INCLUDED_TRACE
          See trace.h
 #define INCLUDED_VFS
          See vfs.h
 #define INCLUDED_VFS_MOUNT
          See vfs_mount.h
 #define INCLUDED_VFS_OPTIMIZER
          See vfs_optimizer.h
 #define INCLUDED_VFS_REDIRECTOR
          See vfs_redirector.h
 #define INCLUDED_VFS_TREE
          See vfs_tree.h
 #define INCLUDED_ZIP
          See zip.h
 #define stats_buf_free
          See file_stats.h
 #define stats_buf_ref
          See file_stats.h
 #define stats_cb_finish
          See file_stats.h
 #define stats_cb_start
          See file_stats.h
 #define stats_close
          See file_stats.h
 #define stats_vfs_init_finish
          See file_stats.h
 #define stats_vfs_init_start
          See file_stats.h
 #define VFS_MAX_FILES ((1u << 16) - 1)
          See vfs.h
 
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 );
See file.cpp.

<

 cassert( sizeof( PosixDirIterator ) <;
See archive.cpp.

ab

 static ArchiveBuildState ab;
See vfs_optimizer.cpp.

ab_connection_attempts

 static uint ab_connection_attempts;
See file_stats.cpp.

ab_repeated_connections

 static uint ab_repeated_connections;
See file_stats.cpp.

AIO_SECTOR_SIZE

 const size_t AIO_SECTOR_SIZE;
========================================================================= File : file_internal.h Project : 0 A.D. Description : master (private) header for all file code. =========================================================================
See file_internal.h.

aiocb_allocator

 static AiocbAllocator aiocb_allocator;
See file_io.cpp.

archive_fn

 static char archive_fn[ PATH_MAX ];
See vfs_optimizer.cpp.

archive_vtbl

 static const FileProvider_VTbl archive_vtbl;
See vfs_redirector.cpp.

archived_files

 static FnSet archived_files;
See vfs_optimizer.cpp.

atom_map

 static AtomMap atom_map;
See path.cpp.

atom_pool

 static Pool atom_pool;
See path.cpp.

block_cache_count

 static uint block_cache_count[ 2 ];
See file_stats.cpp.

block_mgr

 static BlockMgr block_mgr;
See file_cache.cpp.

BUF_ALIGN

 static const size_t BUF_ALIGN;
See file_cache.cpp.

buf_padded_size_total

 static double buf_padded_size_total;
See file_stats.cpp.

buf_user_size_total

 static double buf_user_size_total;
See file_stats.cpp.

BUILD_MINI_ARCHIVE_THRESHOLD

 static const ssize_t BUILD_MINI_ARCHIVE_THRESHOLD;
See vfs_optimizer.cpp.

cache_allocator

 static CacheAllocator cache_allocator;
See file_cache.cpp.

cache_count

 static uint cache_count[ 2 ];
See file_stats.cpp.

cache_size_total

 static double cache_size_total[ 2 ];
See file_stats.cpp.

cdfh_magic

 static const u32 cdfh_magic;
See zip.cpp.

CDFH_SIZE

 const size_t CDFH_SIZE;
See zip.cpp.

CHUNK_SIZE

 static const size_t CHUNK_SIZE;
See archive.cpp.

compressor_allocator

 static SingleAllocator< u8[ MAX_COMPRESSOR_SIZE] > compressor_allocator;
See compression.cpp.

conflict_miss_size_total

 static double conflict_miss_size_total;
See file_stats.cpp.

conflict_misses

 static uint conflict_misses;
See file_stats.cpp.

delimiter_entry

 static const TraceEntry delimiter_entry;
See trace.cpp.

DIR_ITERATOR_OPAQUE_SIZE

 const size_t DIR_ITERATOR_OPAQUE_SIZE;
See file.h.

ecdr_magic

 static const u32 ecdr_magic;
See zip.cpp.

ECDR_SIZE

 const size_t ECDR_SIZE;
See zip.cpp.

ever_cached_files

 static AtomFnSet ever_cached_files;
See file_stats.cpp.

exact_buf_oracle

 static ExactBufOracle exact_buf_oracle;
See file_cache.cpp.

existing_archives

 static DirEnts existing_archives;
See vfs_optimizer.cpp.

extant_bufs

 static ExtantBufMgr extant_bufs;
See file_cache.cpp.

extant_bufs_cur

 static uint extant_bufs_cur;
See file_stats.cpp.

extant_bufs_max

 static uint extant_bufs_max;
See file_stats.cpp.

extant_bufs_total

 static uint extant_bufs_total;
See file_stats.cpp.

FILE_BLOCK_SIZE

 const size_t FILE_BLOCK_SIZE;
See file_internal.h.

FILE_BUF_ALLOC

 const FileIOBuf FILE_BUF_ALLOC;
See file_io.h.

FILE_BUF_TEMP

 FileIOBuf* const FILE_BUF_TEMP;
See file_io.h.

file_cache

 static Cache< const void*, FileIOBuf > file_cache;
See file_cache.cpp.

FILE_IO_OPAQUE_SIZE

 const size_t FILE_IO_OPAQUE_SIZE;
See file_io.h.

FILE_OPAQUE_SIZE

 const size_t FILE_OPAQUE_SIZE;
See file.h.

file_sector_size

 size_t file_sector_size;
See file_io.cpp.

file_vtbl

 static const FileProvider_VTbl file_vtbl;
See vfs_redirector.cpp.

fn_vector

 static std::vector< const char* > fn_vector;
See vfs_optimizer.cpp.

id_mgr

 static IdMgr id_mgr;
See vfs_optimizer.cpp.

initState

 static ModuleInitState initState;
See path.cpp.

io_actual_size_total

 static double io_actual_size_total[ FI_MAX_IDX ][ 2 ];
See file_stats.cpp.

io_allocator

 static SingleAllocator< FileIo > io_allocator;
See archive.cpp.

io_elapsed_time

 static double io_elapsed_time[ FI_MAX_IDX ][ 2 ];
See file_stats.cpp.

io_process_time_total

 static double io_process_time_total;
See file_stats.cpp.

io_seeks

 static uint io_seeks;
See file_stats.cpp.

lfh_magic

 static const u32 lfh_magic;
See zip.cpp.

LFH_SIZE

 const size_t LFH_SIZE;
See zip.cpp.

loose_files

 static FnSet loose_files;
See vfs_optimizer.cpp.

MAX_CACHE_SIZE

 static const size_t MAX_CACHE_SIZE;
See file_cache.cpp.

MAX_COMPRESSOR_SIZE

 static const size_t MAX_COMPRESSOR_SIZE;
See compression.cpp.

MAX_IDS

 static const size_t MAX_IDS;
See vfs_optimizer.cpp.

MAX_MAP_REFS

 static const uint MAX_MAP_REFS;
See file.cpp.

MAX_RELOADS_PER_FRAME

 const size_t MAX_RELOADS_PER_FRAME;
See vfs.cpp.

MAX_RUNS

 static const uint MAX_RUNS;
See trace.cpp.

most_recent_mtime

 static time_t most_recent_mtime;
See vfs_tree.cpp.

mounts

 static Mounts mounts;
See vfs_mount.cpp.

MULTIPLE_MOUNTINGS

 static const Mount* MULTIPLE_MOUNTINGS;
See vfs_mount.cpp.

mutex

 static pthread_mutex_t mutex;
See vfs_tree.cpp.

n_root_dir

 static char n_root_dir[ PATH_MAX ];
See path.cpp.

n_root_dir_len

 static size_t n_root_dir_len;
See path.cpp.

node_pool

 static Pool node_pool;
See vfs_tree.cpp.

NULL_ID

 static const FileId NULL_ID;
See vfs_optimizer.cpp.

open_files_cur

 static uint open_files_cur;
See file_stats.cpp.

open_files_max

 static uint open_files_max;
See file_stats.cpp.

opened_file_size_total

 static double opened_file_size_total;
See file_stats.cpp.

opened_files

 static AtomFnSet opened_files;
See file_stats.cpp.

pp_allocator

 static SingleAllocator< PathPackage > pp_allocator;
See file.cpp.

REBUILD_MAIN_ARCHIVE_THRESHOLD

 static const ssize_t REBUILD_MAIN_ARCHIVE_THRESHOLD;
See vfs_optimizer.cpp.

root_dir_established

 static bool root_dir_established;
See path.cpp.

run_start_indices

 static std::vector< size_t > run_start_indices;
See trace.cpp.

runs

 static TraceRun runs[ MAX_RUNS ];
See trace.cpp.

start_time

 static double start_time;
See file_stats.cpp.

state

  state;
See vfs_optimizer.cpp.

trace_enabled

 static bool trace_enabled;
See trace.cpp.

trace_force_enabled

 static bool trace_force_enabled;
See trace.cpp.

trace_initialized

 static uintptr_t trace_initialized;
See trace.cpp.

trace_pool

 static Pool trace_pool;
See trace.cpp.

tree_root

 static TDir* tree_root;
See vfs_tree.cpp.

tree_vtbl

 static const FileProvider_VTbl tree_vtbl;
See vfs_redirector.cpp.

unique_name_len_total

 static size_t unique_name_len_total;
See file_stats.cpp.

unique_names

 static uint unique_names;
See file_stats.cpp.

user_io_size_total

 static double user_io_size_total;
See file_stats.cpp.

user_ios

 static uint user_ios;
See file_stats.cpp.

vfs_files

 static uint vfs_files;
See file_stats.cpp.

vfs_init_elapsed_time

 static double vfs_init_elapsed_time;
See file_stats.cpp.

vfs_size_total

 static size_t vfs_size_total;
See file_stats.cpp.

vtbl_magic

 static const u32 vtbl_magic;
========================================================================= File : vfs_redirector.cpp Project : 0 A.D. Description : =========================================================================
See vfs_redirector.cpp.

write_target

 static const Mount* write_target;
See vfs_mount.cpp.

za_mgr

 static SingleAllocator< ZipArchive > za_mgr;
See zip.cpp.


Method Detail

add_ent

 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.

add_mount

 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.

add_path_cb

 static LibError add_path_cb( const char* component, bool is_dir, void* ctx );
See vfs_tree.cpp.

afile_cb

 static LibError afile_cb( const char* atom_fn, const struct stat* s, uintptr_t memento, uintptr_t user );
See vfs_mount.cpp.

afile_close

 LibError afile_close( File* f );
sync and async I/O uses file_* and inf_*.
See archive.cpp.

afile_io_discard

 LibError afile_io_discard( FileIo* io );
See archive.cpp.

afile_io_has_completed

 int afile_io_has_completed( FileIo* io );
See archive.cpp.

afile_io_issue

 LibError afile_io_issue( File* f, off_t user_ofs, size_t max_output_size, void* user_buf, FileIo* io );
See archive.cpp.

afile_io_validate

 LibError afile_io_validate( const FileIo* io );
See archive.cpp.

afile_io_wait

 LibError afile_io_wait( FileIo* io, void*& buf, size_t& size );
See archive.cpp.

afile_map

 LibError afile_map( File* f, void*& p, size_t& size );
See archive.cpp.

afile_open

 LibError afile_open( const Handle ha, const char* fn, uintptr_t memento, uint flags, File* f );
See archive.cpp.

afile_open_vfs

 LibError afile_open_vfs( const char* fn, uint flags, TFile* tf, File* f );
See vfs_redirector.cpp.

afile_read

 ssize_t afile_read( File* f, off_t ofs, size_t size, FileIOBuf* pbuf, FileIOCB cb, uintptr_t cb_ctx );
file mapping
See archive.cpp.

afile_stat

 LibError afile_stat( Handle ha, const char* fn, struct stat* s );
See archive.cpp.

afile_unmap

 LibError afile_unmap( File* f );
See archive.cpp.

afile_validate

 LibError afile_validate( const File* f );
See archive.cpp.

archive_add_file

 LibError archive_add_file( Archive* a, const ArchiveEntry* ent );
afile_*: file from Zip archive uses lookup to get file information; holds inflate state.
See archive.cpp.

archive_allocate_entries

 LibError archive_allocate_entries( Archive* a, size_t num_entries );
See archive.cpp.

archive_build

 LibError archive_build( const char* P_archive_filename, Filenames V_fns );
See archive_builder.cpp.

archive_build_cancel

 void archive_build_cancel( ArchiveBuildState* ab );
See archive_builder.cpp.

archive_build_continue

 int archive_build_continue( ArchiveBuildState* ab );
See archive_builder.cpp.

archive_build_init

 LibError archive_build_init( const char* P_archive_filename, Filenames V_fns, ArchiveBuildState* ab );
See archive_builder.cpp.

archive_close

 LibError archive_close( Handle& ha );
See archive.cpp.

Archive_dtor

 static void Archive_dtor( Archive* a );
See archive.cpp.

archive_enum

 LibError archive_enum( const Handle ha, const FileCB cb, const uintptr_t user );
See archive.cpp.

archive_get_file_info

 static LibError archive_get_file_info( Archive* a, const char* fn, uintptr_t memento, ArchiveEntry*& ent );
See archive.cpp.

Archive_init

 static void Archive_init( Archive*, va_list );
See archive.cpp.

archive_less

 static bool archive_less( Handle hza1, Handle hza2 );
See vfs_mount.cpp.

archive_open

 Handle archive_open( const char* fn );
See archive.cpp.

Archive_reload

 static LibError Archive_reload( Archive* a, const char* fn, Handle );
See archive.cpp.

Archive_to_string

 static LibError Archive_to_string( const Archive* a, char* buf );
See archive.cpp.

Archive_validate

 static LibError Archive_validate( const Archive* a );
See archive.cpp.

block_cache_alloc

 void* block_cache_alloc( BlockId id );
See file_cache.cpp.

block_cache_find

 void* block_cache_find( BlockId id );
See file_cache.cpp.

block_cache_make_id

 BlockId block_cache_make_id( const char* atom_fn, const off_t ofs );
See file_cache.cpp.

block_cache_mark_completed

 void block_cache_mark_completed( BlockId id );
See file_cache.cpp.

block_cache_release

 void block_cache_release( BlockId id );
See file_cache.cpp.

block_eq

 bool block_eq( BlockId b1, BlockId b2 );
See file_cache.cpp.

build_mini_archive

 static LibError build_mini_archive( const char* mini_archive_fn_fmt );
See vfs_optimizer.cpp.

cache_alloc

 static FileIOBuf cache_alloc( size_t size );
See file_cache.cpp.

cache_free

 static void cache_free( FileIOBuf exact_buf, size_t exact_size );
See file_cache.cpp.

can_ignore_reload

 static bool can_ignore_reload( const char* V_path, PathList pending_reloads, uint num_pending );
See vfs.cpp.

cassert

 cassert( LFH_SIZE == 30 );
See zip.cpp.

cassert

 cassert( CDFH_SIZE == 46 );
See zip.cpp.

cassert

 cassert( ECDR_SIZE == 22 );
See zip.cpp.

cdfh_assemble

 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.

cdfh_decompose

 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.

cid_first

 static FileId cid_first( ConnectionId id );
See vfs_optimizer.cpp.

cid_make

 static ConnectionId cid_make( FileId first, FileId second );
See vfs_optimizer.cpp.

cid_second

 static FileId cid_second( ConnectionId id );
See vfs_optimizer.cpp.

comp_alloc

 uintptr_t comp_alloc( ContextType type, CompressionMethod method );
See compression.cpp.

comp_alloc_output

 LibError comp_alloc_output( uintptr_t c_, size_t in_size );
See compression.cpp.

comp_feed

 ssize_t comp_feed( uintptr_t c_, const void* in, size_t in_size );
See compression.cpp.

comp_finish

 LibError comp_finish( uintptr_t c_, void** out, size_t* out_size );
See compression.cpp.

comp_free

 void comp_free( uintptr_t c_ );
See compression.cpp.

comp_get_output

 void* comp_get_output( uintptr_t c_ );
See compression.cpp.

comp_reset

 LibError comp_reset( uintptr_t c_ );
See compression.cpp.

comp_set_output

 void comp_set_output( uintptr_t c_, void* out, size_t out_size );
See compression.cpp.

compress_cb

 static LibError compress_cb( uintptr_t cb_ctx, const void* block, size_t size, size_t* bytes_processed );
See archive_builder.cpp.

convert_path

 static LibError convert_path( char* dst, const char* src, Conversion conv = TO_NATIVE );
See path.cpp.

decompressor_feed_cb

 static LibError decompressor_feed_cb( uintptr_t cb_ctx, const void* cblock, size_t csize, size_t* bytes_processed );
See archive.cpp.

dir_close

 LibError dir_close( DirIterator* di );
See file.cpp.

dir_create

 LibError dir_create( const char* P_path );
See file.cpp.

dir_delete

 LibError dir_delete( const char* P_path );
See file.cpp.

dir_exists

 bool dir_exists( const char* P_path );
See file.cpp.

dir_filtered_next_ent

 LibError dir_filtered_next_ent( DirIterator* di, DirEnt* ent, const char* filter );
See file_util.cpp.

dir_next_ent

 LibError dir_next_ent( DirIterator* di, DirEnt* ent );
See file.cpp.

dir_open

 LibError dir_open( const char* P_path, DirIterator* di );
See file.cpp.

dirent_less

 static bool dirent_less( const DirEnt& d1, const DirEnt& d2 );
========================================================================= File : file_util.cpp Project : 0 A.D. Description : utility functions for file and path handling modules =========================================================================
See file_util.cpp.

displayR

 static void displayR( TDir* td, int indent_level );
See vfs_tree.cpp.

ecdr_assemble

 static void ecdr_assemble( ECDR* dst_ecdr_le, uint cd_entries, off_t cd_ofs, size_t cd_size );
See zip.cpp.

ecdr_decompose

 static void ecdr_decompose( ECDR* ecdr_le, uint& cd_entries, off_t& cd_ofs, size_t& cd_size );
See zip.cpp.

enqueue_archive

 static LibError enqueue_archive( const char* name, const char* P_archive_dir, Archives* archives );
See vfs_mount.cpp.

enqueue_dir

 static LibError enqueue_dir( TDir* parent_td, const char* name, const char* P_parent_path, DirQueue* dir_queue );
See vfs_mount.cpp.

ERROR_ASSOCIATE

 ERROR_ASSOCIATE( ERR::TNODE_NOT_FOUND,"File/directory not found", ENOENT );
========================================================================= File : vfs_tree.cpp Project : 0 A.D. Description : the actual 'filesystem' and its tree of directories. =========================================================================
See vfs_tree.cpp.

ERROR_ASSOCIATE

 ERROR_ASSOCIATE( ERR::ROOT_DIR_ALREADY_SET,"Attempting to set FS root dir more than once",-1 );
========================================================================= File : path.cpp Project : 0 A.D. Description : helper functions for VFS paths. =========================================================================
See path.cpp.

ERROR_ASSOCIATE

 ERROR_ASSOCIATE( ERR::DIR_END,"End of directory reached (no more files)",-1 );
See file.cpp.

ERROR_ASSOCIATE

 ERROR_ASSOCIATE( ERR::IO_EOF,"Reading beyond end of file",-1 );
See file_io.cpp.

ERROR_ASSOCIATE

 ERROR_ASSOCIATE( ERR::COMPRESSION_UNKNOWN_METHOD,"Unknown/unsupported compression method",-1 );
========================================================================= File : compression.cpp Project : 0 A.D. Description : interface for compressing/decompressing data streams. : currently implements "deflate" (RFC1951). =========================================================================
See compression.cpp.

ERROR_ASSOCIATE

 ERROR_ASSOCIATE( ERR::TRACE_EMPTY,"No valid entries in trace",-1 );
========================================================================= File : trace.cpp Project : 0 A.D. Description : allows recording and 'playing back' a sequence of : I/Os - useful for benchmarking and archive builder. =========================================================================
See trace.cpp.

ERROR_ASSOCIATE

 ERROR_ASSOCIATE( ERR::FILE_NOT_MAPPED,"File was not mapped",-1 );
See file.cpp.

ERROR_ASSOCIATE

 ERROR_ASSOCIATE( ERR::TNODE_WRONG_TYPE,"Using a directory as file or vice versa",-1 );
See vfs_tree.cpp.

ERROR_ASSOCIATE

 ERROR_ASSOCIATE( ERR::FILE_ACCESS,"Insufficient access rights to open file", EACCES );
========================================================================= File : file.cpp Project : 0 A.D. Description : file layer on top of POSIX. avoids the need for : absolute paths. =========================================================================
See file.cpp.

ERROR_ASSOCIATE

 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.
See archive.cpp.

ERROR_ASSOCIATE

 ERROR_ASSOCIATE( ERR::IO,"Error during IO", EIO );
========================================================================= File : file_io.cpp Project : 0 A.D. Description : provide fast I/O via POSIX aio and splitting into blocks. =========================================================================
See file_io.cpp.

FAT_from_time_t

 u32 FAT_from_time_t( time_t time );
See zip.cpp.

file_buf_add_padding

 void file_buf_add_padding( FileIOBuf exact_buf, size_t exact_size, size_t padding );
See file_cache.cpp.

file_buf_alloc

 FileIOBuf file_buf_alloc( size_t size, const char* atom_fn, uint fb_flags );
See file_cache.cpp.

file_buf_free

 LibError file_buf_free( FileIOBuf buf, uint fb_flags );
See file_cache.cpp.

file_buf_set_real_fn

 LibError file_buf_set_real_fn( FileIOBuf buf, const char* atom_fn );
See file_cache.cpp.

file_cache_add

 LibError file_cache_add( FileIOBuf buf, size_t size, const char* atom_fn, uint file_flags );
See file_cache.cpp.

file_cache_allocator_alloc

 void* file_cache_allocator_alloc( size_t size );
See file_cache.cpp.

file_cache_allocator_free

 void file_cache_allocator_free( u8* p, size_t size );
See file_cache.cpp.

file_cache_allocator_reset

 void file_cache_allocator_reset();
See file_cache.cpp.

file_cache_init

 void file_cache_init();
See file_cache.cpp.

file_cache_invalidate

 LibError file_cache_invalidate( const char* P_fn );
See file_cache.cpp.

file_cache_reset

 void file_cache_reset();
See file_cache.cpp.

file_cache_retrieve

 FileIOBuf file_cache_retrieve( const char* atom_fn, size_t* psize, uint fb_flags );
See file_cache.cpp.

file_cache_shutdown

 void file_cache_shutdown();
See file_cache.cpp.

file_cache_would_add

 bool file_cache_would_add( size_t size, const char* UNUSED( atom_fn ), uint file_flags );
See file_cache.cpp.

file_close

 LibError file_close( File* f );
memory mapping
See file.cpp.

file_delete

 LibError file_delete( const char* fn );
file open/close stores information about file (e.g. size) in File struct
See file.cpp.

file_enum

 LibError file_enum( const char* P_path, const FileCB cb, const uintptr_t user );
See file_util.cpp.

file_exists

 bool file_exists( const char* fn );
See file.cpp.

file_fd_from_PosixFile

 int file_fd_from_PosixFile( File* f );
See file.cpp.

file_get_random_name

 const char* file_get_random_name();
See path.cpp.

file_get_sorted_dirents

 LibError file_get_sorted_dirents( const char* P_path, DirEnts& dirents );
See file_util.cpp.

file_init

 LibError file_init();
See file.cpp.

file_io

 ssize_t file_io( File* f, off_t ofs, size_t size, FileIOBuf* pbuf, FileIOCB cb, uintptr_t ctx );
See file_io.cpp.

file_io_call_back

 LibError file_io_call_back( const void* block, size_t size, FileIOCB cb, uintptr_t ctx, size_t& bytes_processed );
See file_io.cpp.

file_io_discard

 LibError file_io_discard( FileIo* io );
See file_io.cpp.

file_io_get_buf

 LibError file_io_get_buf( FileIOBuf* pbuf, size_t size, const char* atom_fn, uint file_flags, FileIOCB cb );
See file_io.cpp.

file_io_has_completed

 int file_io_has_completed( FileIo* io );
See file_io.cpp.

file_io_init

 void file_io_init();
See file_io.cpp.

file_io_issue

 LibError file_io_issue( File* f, off_t ofs, size_t size, void* p, FileIo* io );
See file_io.cpp.

file_io_shutdown

 void file_io_shutdown();
See file_io.cpp.

file_io_validate

 LibError file_io_validate( const FileIo* io );
See file_io.cpp.

file_io_wait

 LibError file_io_wait( FileIo* io, void*& p, size_t& size );
See file_io.cpp.

file_make_full_native_path

 LibError file_make_full_native_path( const char* path, char* n_full_path );
See path.cpp.

file_make_full_portable_path

 LibError file_make_full_portable_path( const char* n_full_path, char* path );
See path.cpp.

file_make_native_path

 LibError file_make_native_path( const char* path, char* n_path );
See path.cpp.

file_make_portable_path

 LibError file_make_portable_path( const char* n_path, char* path );
See path.cpp.

file_make_unique_fn_copy

 const char* file_make_unique_fn_copy( const char* P_fn );
See path.cpp.

file_map

 LibError file_map( File* f, void*& p, size_t& size );
See file.cpp.

file_open

 LibError file_open( const char* P_fn, uint flags, File* f );
See file.cpp.

file_open_vfs

 LibError file_open_vfs( const char* V_path, uint flags, TFile* tf, File* f );
See vfs_redirector.cpp.

file_set_root_dir

 LibError file_set_root_dir( const char* argv0, const char* rel_path );
See path.cpp.

file_shutdown

 LibError file_shutdown();
See file.cpp.

file_stat

 LibError file_stat( const char* fn, struct stat* s );
See file.cpp.

file_stat_impl

 static LibError file_stat_impl( const char* fn, struct stat* s, bool warn_if_failed = true );
See file.cpp.

file_stats_dump

 void file_stats_dump();
See file_stats.cpp.

file_type_is_uncompressible

 static inline bool file_type_is_uncompressible( const char* fn );
========================================================================= File : archive_builder.cpp Project : 0 A.D. Description : =========================================================================
See archive_builder.cpp.

file_unmap

 LibError file_unmap( File* f );
See file.cpp.

file_validate

 LibError file_validate( const File* f );
See file.cpp.

free_padded_buf

 static void free_padded_buf( FileIOBuf padded_buf, size_t size, bool from_heap = false );
See file_cache.cpp.

H_TYPE_DEFINE

 H_TYPE_DEFINE( Archive );
See archive.cpp.

H_TYPE_DEFINE

 H_TYPE_DEFINE( VFile );
See vfs.cpp.

H_TYPE_DEFINE

 H_TYPE_DEFINE( VIo );
See vfs.cpp.

H_TYPE_DEFINE

 H_TYPE_DEFINE( VDir );
See vfs.cpp.

is_archivable

 static bool is_archivable( const TFile* tf );
See vfs_optimizer.cpp.

is_compressed

 static inline bool is_compressed( ArchiveFile* af );
See archive.cpp.

lfh_assemble

 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.

lfh_copier_cb

 static LibError lfh_copier_cb( uintptr_t ctx, const void* block, size_t size, size_t* bytes_processed );
See zip.cpp.

lfh_total_size

 static off_t lfh_total_size( const LFH* lfh_le );
See zip.cpp.

LibError_from_zlib

 static LibError LibError_from_zlib( int zlib_err, bool warn_if_failed = true );
See compression.cpp.

lookup

 static LibError lookup( TDir* td, const char* path, uint flags, TNode** pnode );
See vfs_tree.cpp.

lookup_cb

 static LibError lookup_cb( const char* component, bool is_dir, void* ctx );
See vfs_tree.cpp.

method_for_zip_method

 static CompressionMethod method_for_zip_method( ZipCompressionMethod zip_method );
See zip.cpp.

mount_archive

 static LibError mount_archive( TDir* td, const Mount& m );
See vfs_mount.cpp.

mount_archives

 static LibError mount_archives( TDir* td, Archives* archives, const Mount* mount );
See vfs_mount.cpp.

mount_attach_real_dir

 LibError mount_attach_real_dir( RealDir* rd, const char* P_path, const Mount* m, uint flags );
See vfs_mount.cpp.

mount_create_real_dir

 LibError mount_create_real_dir( const char* V_path, const Mount* m );
See vfs_mount.cpp.

mount_detach_real_dir

 void mount_detach_real_dir( RealDir* rd );
See vfs_mount.cpp.

mount_dir_tree

 static LibError mount_dir_tree( TDir* td_start, const Mount& m );
mount list (allows multiple mountings, e.g. for mods)
See vfs_mount.cpp.

mount_get_archive

 Handle mount_get_archive( const Mount* m );
See vfs_mount.cpp.

mount_get_type

 char mount_get_type( const Mount* m );
See vfs_mount.cpp.

mount_init

 void mount_init();
See vfs_mount.cpp.

mount_is_archivable

 bool mount_is_archivable( const Mount* m );
See vfs_mount.cpp.

mount_make_vfs_path

 LibError mount_make_vfs_path( const char* P_path, char* V_path );
See vfs_mount.cpp.

mount_populate

 LibError mount_populate( TDir* td, RealDir* rd );
See vfs_mount.cpp.

mount_realpath

 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.
See vfs_mount.cpp.

mount_rebuild

 LibError mount_rebuild();
See vfs_mount.cpp.

mount_release_all_archives

 void mount_release_all_archives();
See vfs_mount.cpp.

mount_should_replace

 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.

mount_shutdown

 void mount_shutdown();
See vfs_mount.cpp.

mount_unmount_all

 static void mount_unmount_all( void );
See vfs_mount.cpp.

next_numbered_filename

 void next_numbered_filename( const char* fn_fmt, NextNumberedFilenameInfo* nfi, char* next_fn, bool use_vfs );
See file_util.cpp.

node_alloc

 static void* node_alloc();
See vfs_tree.cpp.

node_free_all

 static inline void node_free_all();
See vfs_tree.cpp.

node_init

 static inline void node_init();
See vfs_tree.cpp.

node_shutdown

 static inline void node_shutdown();
See vfs_tree.cpp.

path_init

 void path_init();
See path.cpp.

path_is_atom_fn

 bool path_is_atom_fn( const char* fn );
See path.cpp.

path_reset_root_dir

 void path_reset_root_dir();
See path.cpp.

path_shutdown

 void path_shutdown();
See path.cpp.

percent

 template< typename T > int percent( T num, T divisor );
See file_stats.cpp.

populate_dir

 static LibError populate_dir( TDir* td, const char* P_path, const Mount* m, DirQueue* dir_queue, Archives* archives, uint flags );
See vfs_mount.cpp.

read_and_compress_file

 static LibError read_and_compress_file( const char* atom_fn, uintptr_t ctx, ArchiveEntry& ent, void*& file_contents, FileIOBuf& buf );
See archive_builder.cpp.

reload_without_rebuild

 static LibError reload_without_rebuild( const char* fn );
See vfs.cpp.

remount

 static LibError remount( const Mount& m );
See vfs_mount.cpp.

remount_all

 static inline void remount_all();
See vfs_mount.cpp.

set_most_recent_if_newer

 static void set_most_recent_if_newer( time_t mtime );
See vfs_tree.cpp.

set_mount_to_write_target

 LibError set_mount_to_write_target( TFile* tf );
See vfs_mount.cpp.

should_build_mini_archive

 static bool should_build_mini_archive( const char* UNUSED( mini_archive_fn_fmt ) );
See vfs_optimizer.cpp.

should_rebuild_main_archive

 static bool should_rebuild_main_archive( const char* trace_filename, DirEnts& existing_archives );
See vfs_optimizer.cpp.

should_store_compressed

 static bool should_store_compressed( size_t ucsize, size_t csize );
See archive_builder.cpp.

stats_ab_connection

 void stats_ab_connection( bool already_exists );
See file_stats.cpp.

stats_block_cache

 void stats_block_cache( CacheRet cr );
See file_stats.cpp.

stats_buf_alloc

 void stats_buf_alloc( size_t user_size, size_t padded_size );
See file_stats.cpp.

stats_buf_free

 void stats_buf_free();
See file_stats.cpp.

stats_buf_ref

 void stats_buf_ref();
See file_stats.cpp.

stats_cache

 void stats_cache( CacheRet cr, size_t size, const char* atom_fn );
See file_stats.cpp.

stats_cb_finish

 void stats_cb_finish();
See file_stats.cpp.

stats_cb_start

 void stats_cb_start();
See file_stats.cpp.

stats_close

 void stats_close();
See file_stats.cpp.

stats_io_check_seek

 void stats_io_check_seek( const char* atom_fn, u32 block_num );
See file_stats.cpp.

stats_io_sync_finish

 void stats_io_sync_finish( FileIOImplentation fi, FileOp fo, ssize_t user_size, double* start_time_storage );
See file_stats.cpp.

stats_io_sync_start

 void stats_io_sync_start( double* start_time_storage );
See file_stats.cpp.

stats_io_user_request

 void stats_io_user_request( size_t user_size );
See file_stats.cpp.

stats_open

 void stats_open( const char* atom_fn, size_t file_size );
See file_stats.cpp.

stats_unique_name

 void stats_unique_name( size_t name_len );
See file_stats.cpp.

stats_vfs_file_add

 void stats_vfs_file_add( size_t file_size );
See file_stats.cpp.

stats_vfs_file_remove

 void stats_vfs_file_remove( size_t file_size );
See file_stats.cpp.

stats_vfs_init_finish

 void stats_vfs_init_finish();
See file_stats.cpp.

stats_vfs_init_start

 void stats_vfs_init_start();
See file_stats.cpp.

tfile_get_atom_fn

 const char* tfile_get_atom_fn( const TFile* tf );
See vfs_tree.cpp.

tfile_get_memento

 uintptr_t tfile_get_memento( const TFile* tf );
See vfs_tree.cpp.

tfile_get_mount

 const Mount* tfile_get_mount( const TFile* tf );
See vfs_tree.cpp.

tfile_set_mount

 void tfile_set_mount( TFile* tf, const Mount* m );
See vfs_tree.cpp.

time_t_from_FAT

 time_t time_t_from_FAT( u32 fat_timedate );
========================================================================= File : zip.cpp Project : 0 A.D. Description : archive backend for Zip files. =========================================================================
See zip.cpp.

TIMER_ADD_CLIENT

 TIMER_ADD_CLIENT( tc_zip_memcpy );
See compression.cpp.

TIMER_ADD_CLIENT

 TIMER_ADD_CLIENT( tc_zip_inflate );
See compression.cpp.

timer_reset

 static double timer_reset( double* start_time_storage =& start_time );
See file_stats.cpp.

timer_start

 static void timer_start( double* start_time_storage =& start_time );
See file_stats.cpp.

trace_add

 static LibError trace_add( TraceOp op, const char* P_fn, size_t size, uint flags = 0, double timestamp = 0. 0 );
See trace.cpp.

trace_clear

 void trace_clear();
See trace.cpp.

trace_enable

 void trace_enable( bool want_enabled );
See trace.cpp.

trace_entry_causes_io

 bool trace_entry_causes_io( const TraceEntry* ent );
See trace.cpp.

trace_gen_random

 void trace_gen_random( size_t num_entries );
See trace.cpp.

trace_get

 void trace_get( Trace* t );
See trace.cpp.

trace_get_raw_ents

 static void trace_get_raw_ents( const TraceEntry*& ents, size_t& num_ents );
See trace.cpp.

trace_init

 static inline void trace_init();
See trace.cpp.

trace_notify_free

 void trace_notify_free( const char* P_fn, size_t size );
See trace.cpp.

trace_notify_io

 void trace_notify_io( const char* P_fn, size_t size, uint flags );
See trace.cpp.

trace_read_from_file

 LibError trace_read_from_file( const char* trace_filename, Trace* t );
See trace.cpp.

trace_run

 LibError trace_run( const char* trace_filename, uint flags );
See trace.cpp.

trace_shutdown

 void trace_shutdown();
See trace.cpp.

trace_write_to_file

 LibError trace_write_to_file( const char* trace_filename );
See trace.cpp.

tree_add_dir

 LibError tree_add_dir( TDir* td, const char* name, TDir** ptd );
See vfs_tree.cpp.

tree_add_file

 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.

tree_add_path

 LibError tree_add_path( const char* V_dir_path, const Mount* m, TDir** ptd );
See vfs_tree.cpp.

tree_clear

 void tree_clear();
See vfs_tree.cpp.

tree_dir_close

 LibError tree_dir_close( DirIterator* UNUSED( d ) );
See vfs_tree.cpp.

tree_dir_next_ent

 LibError tree_dir_next_ent( DirIterator* di, DirEnt* ent );
See vfs_tree.cpp.

tree_dir_open

 LibError tree_dir_open( const char* V_dir_path, DirIterator* di );
See vfs_tree.cpp.

tree_display

 void tree_display();
See vfs_tree.cpp.

tree_get_real_dir

 RealDir* tree_get_real_dir( TDir* td );
See vfs_tree.cpp.

tree_init

 void tree_init();
See vfs_tree.cpp.

tree_lock

 void tree_lock();
See vfs_tree.cpp.

tree_lookup

 LibError tree_lookup( const char* V_path, TFile** pfile, uint flags );
See vfs_tree.cpp.

tree_lookup_dir

 LibError tree_lookup_dir( const char* V_path, TDir** ptd, uint flags );
See vfs_tree.cpp.

tree_most_recent_mtime

 time_t tree_most_recent_mtime();
See vfs_tree.cpp.

tree_root_init

 static void tree_root_init();
See vfs_tree.cpp.

tree_root_shutdown

 static void tree_root_shutdown();
See vfs_tree.cpp.

tree_shutdown

 void tree_shutdown();
See vfs_tree.cpp.

tree_stat

 LibError tree_stat( const TFile* tf, struct stat* s );
See vfs_tree.cpp.

tree_unlock

 void tree_unlock();
See vfs_tree.cpp.

tree_update_file

 void tree_update_file( TFile* tf, off_t size, time_t mtime );
See vfs_tree.cpp.

VDir_dtor

 static void VDir_dtor( VDir* vd );
See vfs.cpp.

VDir_init

 static void VDir_init( VDir* UNUSED( vd ), va_list UNUSED( args ) );
See vfs.cpp.

VDir_reload

 static LibError VDir_reload( VDir* vd, const char* V_dir_path, Handle UNUSED( hvd ) );
See vfs.cpp.

VDir_to_string

 static LibError VDir_to_string( const VDir* vd, char* buf );
See vfs.cpp.

VDir_validate

 static LibError VDir_validate( const VDir* vd );
See vfs.cpp.

VFile_dtor

 static void VFile_dtor( VFile* vf );
See vfs.cpp.

VFile_init

 static void VFile_init( VFile* vf, va_list args );
See vfs.cpp.

VFile_reload

 static LibError VFile_reload( VFile* vf, const char* V_path, Handle );
See vfs.cpp.

VFile_to_string

 static LibError VFile_to_string( const VFile* UNUSED( vf ), char* buf );
See vfs.cpp.

VFile_validate

 static LibError VFile_validate( const VFile* vf );
See vfs.cpp.

vfs_close

 LibError vfs_close( Handle& hf );
See vfs.cpp.

vfs_dir_close

 LibError vfs_dir_close( Handle& hd );
See vfs.cpp.

vfs_dir_enum

 LibError vfs_dir_enum( const char* start_path, uint flags, const char* user_filter, DirEnumCB cb, void* context );
See file_util.cpp.

vfs_dir_next_ent

 LibError vfs_dir_next_ent( const Handle hd, DirEnt* ent, const char* filter );
file
See vfs.cpp.

vfs_dir_open

 Handle vfs_dir_open( const char* V_dir_path );
See vfs.cpp.

vfs_display

 void vfs_display();
See vfs.cpp.

vfs_exists

 bool vfs_exists( const char* V_fn );
See vfs.cpp.

vfs_init

 void vfs_init();
See vfs.cpp.

vfs_io

 ssize_t vfs_io( const Handle hf, const size_t size, FileIOBuf* pbuf, FileIOCB cb, uintptr_t cb_ctx );
See vfs.cpp.

vfs_io_discard

 LibError vfs_io_discard( Handle& hio );
See vfs.cpp.

vfs_io_has_completed

 int vfs_io_has_completed( Handle hio );
See vfs.cpp.

vfs_io_issue

 Handle vfs_io_issue( Handle hf, size_t size, void* buf );
See vfs.cpp.

vfs_io_wait

 LibError vfs_io_wait( Handle hio, void*& p, size_t& size );
memory mapping
See vfs.cpp.

vfs_load

 LibError vfs_load( const char* V_fn, FileIOBuf& buf, size_t& size, uint file_flags, FileIOCB cb, uintptr_t cb_ctx );
See vfs.cpp.

vfs_map

 LibError vfs_map( const Handle hf, const uint UNUSED( flags ), void*& p, size_t& size );
See vfs.cpp.

vfs_mount

 LibError vfs_mount( const char* V_mount_point, const char* P_real_path, uint flags, uint pri );
See vfs_mount.cpp.

vfs_open

 Handle vfs_open( const char* V_fn, uint file_flags );
See vfs.cpp.

vfs_opt_auto_build

 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.

vfs_opt_auto_build_cancel

 void vfs_opt_auto_build_cancel();
See vfs_optimizer.cpp.

vfs_opt_continue

 static int vfs_opt_continue();
See vfs_optimizer.cpp.

vfs_opt_init

 static LibError vfs_opt_init( const char* trace_filename, const char* archive_fn_fmt, bool force_build );
See vfs_optimizer.cpp.

vfs_opt_notify_loose_file

 void vfs_opt_notify_loose_file( const char* atom_fn );
See vfs_optimizer.cpp.

vfs_opt_notify_non_loose_file

 void vfs_opt_notify_non_loose_file( const char* atom_fn );
See vfs_optimizer.cpp.

vfs_opt_rebuild_main_archive

 LibError vfs_opt_rebuild_main_archive( const char* trace_filename, const char* archive_fn_fmt );
See vfs_optimizer.cpp.

vfs_realpath

 LibError vfs_realpath( const char* V_path, char* realpath );
See vfs.cpp.

vfs_reload

 LibError vfs_reload( const char* fn );
See vfs.cpp.

vfs_reload_changed_files

 LibError vfs_reload_changed_files();
See vfs.cpp.

vfs_set_write_target

 LibError vfs_set_write_target( const char* P_target_dir );
See vfs_mount.cpp.

vfs_shutdown

 void vfs_shutdown();
See vfs.cpp.

vfs_size

 ssize_t vfs_size( Handle hf );
See vfs.cpp.

vfs_stat

 LibError vfs_stat( const char* V_path, struct stat* s );
See vfs.cpp.

vfs_store

 ssize_t vfs_store( const char* V_fn, const void* p, const size_t size, uint flags );
asynchronous I/O
See vfs.cpp.

vfs_unmap

 LibError vfs_unmap( const Handle hf );
See vfs.cpp.

vfs_unmount

 LibError vfs_unmount( const char* P_name );
See vfs_mount.cpp.

VIo_dtor

 static void VIo_dtor( VIo* vio );
See vfs.cpp.

VIo_init

 static void VIo_init( VIo* vio, va_list args );
See vfs.cpp.

VIo_reload

 static LibError VIo_reload( VIo* vio, const char* UNUSED( fn ), Handle UNUSED( h ) );
See vfs.cpp.

VIo_to_string

 static LibError VIo_to_string( const VIo* vio, char* buf );
See vfs.cpp.

VIo_validate

 static LibError VIo_validate( const VIo* vio );
See vfs.cpp.

vtbl_validate

 static LibError vtbl_validate( const FileProvider_VTbl* vtbl );
See vfs_redirector.cpp.

write_entry

 static void write_entry( FILE* f, const TraceEntry* ent );
See trace.cpp.

xdir_close

 LibError xdir_close( DirIterator* di );
See vfs_redirector.cpp.

xdir_next_ent

 LibError xdir_next_ent( DirIterator* di, DirEnt* ent );
See vfs_redirector.cpp.

xdir_open

 LibError xdir_open( const char* dir, DirIterator* di );
See vfs_redirector.cpp.

xfile_close

 LibError xfile_close( File* f );
See vfs_redirector.cpp.

xfile_io

 ssize_t xfile_io( File* f, off_t ofs, size_t size, FileIOBuf* pbuf, FileIOCB cb, uintptr_t ctx );
See vfs_redirector.cpp.

xfile_io_discard

 LibError xfile_io_discard( FileIo* io );
See vfs_redirector.cpp.

xfile_io_has_completed

 int xfile_io_has_completed( FileIo* io );
See vfs_redirector.cpp.

xfile_io_issue

 LibError xfile_io_issue( File* f, off_t ofs, size_t size, void* buf, FileIo* io );
See vfs_redirector.cpp.

xfile_io_validate

 LibError xfile_io_validate( const FileIo* io );
See vfs_redirector.cpp.

xfile_io_wait

 LibError xfile_io_wait( FileIo* io, void*& p, size_t& size );
See vfs_redirector.cpp.

xfile_is_open

 bool xfile_is_open( const File* f );
See vfs_redirector.cpp.

xfile_map

 LibError xfile_map( File* f, void*& p, size_t& size );
See vfs_redirector.cpp.

xfile_open

 LibError xfile_open( const char* V_path, uint flags, TFile* tf, File* f );
See vfs_redirector.cpp.

xfile_unmap

 LibError xfile_unmap( File* f );
See vfs_redirector.cpp.

xfile_validate

 LibError xfile_validate( const File* f );
See vfs_redirector.cpp.

za_find_cd

 static LibError za_find_cd( File* f, uint& cd_entries, off_t& cd_ofs, size_t& cd_size );
See zip.cpp.

za_find_ecdr

 static LibError za_find_ecdr( File* f, size_t max_scan_amount, ECDR* dst_ecdr_le );
See zip.cpp.

za_find_id

 static const u8* za_find_id( const u8* buf, size_t size, const void* start, u32 magic, size_t record_size );
See zip.cpp.

zip_archive_add_file

 LibError zip_archive_add_file( ZipArchive* za, const ArchiveEntry* ae, void* file_contents );
See zip.cpp.

zip_archive_create

 LibError zip_archive_create( const char* zip_filename, ZipArchive** pza );
See zip.cpp.

zip_archive_finish

 LibError zip_archive_finish( ZipArchive* za );
See zip.cpp.

zip_fixup_lfh

 void zip_fixup_lfh( File* f, ArchiveEntry* ent );
See zip.cpp.

zip_method_for

 static ZipCompressionMethod zip_method_for( CompressionMethod method );
See zip.cpp.

zip_populate_archive

 LibError zip_populate_archive( File* f, Archive* a );
See zip.cpp.


Symbol Detail

AB_COMPARE_MTIME

 #define AB_COMPARE_MTIME 1
See vfs_optimizer.cpp.

AB_COUNT_LOOSE_FILES

 #define AB_COUNT_LOOSE_FILES 1
See vfs_optimizer.cpp.

file_stats_dump

 #define file_stats_dump 
See file_stats.h.

FILE_STATS_ENABLED

 #define FILE_STATS_ENABLED 1
See file_stats.h.

INCLUDED_ARCHIVE

 #define INCLUDED_ARCHIVE 
See archive.h.

INCLUDED_ARCHIVE_BUILDER

 #define INCLUDED_ARCHIVE_BUILDER 
See archive_builder.h.

INCLUDED_COMPRESSION

 #define INCLUDED_COMPRESSION 
See compression.h.

INCLUDED_FILE

 #define INCLUDED_FILE 
See file.h.

INCLUDED_FILE_CACHE

 #define INCLUDED_FILE_CACHE 
See file_cache.h.

INCLUDED_FILE_IO

 #define INCLUDED_FILE_IO 
See file_io.h.

INCLUDED_FILE_STATS

 #define INCLUDED_FILE_STATS 
See file_stats.h.

INCLUDED_PATH

 #define INCLUDED_PATH 
See path.h.

INCLUDED_TRACE

 #define INCLUDED_TRACE 
See trace.h.

INCLUDED_VFS

 #define INCLUDED_VFS 
See vfs.h.

INCLUDED_VFS_MOUNT

 #define INCLUDED_VFS_MOUNT 
See vfs_mount.h.

INCLUDED_VFS_OPTIMIZER

 #define INCLUDED_VFS_OPTIMIZER 
See vfs_optimizer.h.

INCLUDED_VFS_REDIRECTOR

 #define INCLUDED_VFS_REDIRECTOR 
See vfs_redirector.h.

INCLUDED_VFS_TREE

 #define INCLUDED_VFS_TREE 
See vfs_tree.h.

INCLUDED_ZIP

 #define INCLUDED_ZIP 
See zip.h.

stats_buf_free

 #define stats_buf_free 
See file_stats.h.

stats_buf_ref

 #define stats_buf_ref 
See file_stats.h.

stats_cb_finish

 #define stats_cb_finish 
See file_stats.h.

stats_cb_start

 #define stats_cb_start 
See file_stats.h.

stats_close

 #define stats_close 
See file_stats.h.

stats_vfs_init_finish

 #define stats_vfs_init_finish 
See file_stats.h.

stats_vfs_init_start

 #define stats_vfs_init_start 
See file_stats.h.

VFS_MAX_FILES

 #define VFS_MAX_FILES ((1u << 16) - 1)
See vfs.h.


Macro Detail

CHECK_AFILE

 #define CHECK_AFILE(f) RETURN_ERR(afile_validate(f))
See archive.cpp.

CHECK_FILE

 #define CHECK_FILE(f) RETURN_ERR(file_validate(f))
See file.h.

CHECK_VTBL

 #define CHECK_VTBL(type) RETURN_ERR(vtbl_validate(type))
See vfs_redirector.cpp.

DIRENT_IS_DIR

 #define DIRENT_IS_DIR(p_ent) ((p_ent)->size == -1)
See file.h.

stats_ab_connection

 #define stats_ab_connection(already_exists) 
See file_stats.h.

stats_block_cache

 #define stats_block_cache(cr) 
See file_stats.h.

stats_buf_alloc

 #define stats_buf_alloc(user_size, padded_size) 
See file_stats.h.

stats_cache

 #define stats_cache(cr, size, atom_fn) 
See file_stats.h.

stats_io_check_seek

 #define stats_io_check_seek(atom_fn, block_num) 
See file_stats.h.

stats_io_sync_finish

 #define stats_io_sync_finish(fi, fo, user_size, start_time_storage) 
See file_stats.h.

stats_io_sync_start

 #define stats_io_sync_start(disk_pos, start_time_storage) 
See file_stats.h.

stats_io_user_request

 #define stats_io_user_request(user_size) 
See file_stats.h.

stats_open

 #define stats_open(atom_fn, file_size) 
See file_stats.h.

stats_unique_name

 #define stats_unique_name(name_len) 
See file_stats.h.

stats_vfs_file_add

 #define stats_vfs_file_add(file_size) 
See file_stats.h.

stats_vfs_file_remove

 #define stats_vfs_file_remove(file_size) 
See file_stats.h.

THROUGHPUT

 #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.

VFS_PATH_IS_DIR

 #define VFS_PATH_IS_DIR(path) (*path == '\0' || path[strlen(path)-1] == '/')
See path.h.

 Overview   Project   Class   Tree   Deprecated   Index 
0 A.D.
Generated on September 04, 2007 at 18:13
CppDoc v2.4.0
FRAMES    NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD