Simulant  21.12-166
A portable game engine for Windows, OSX, Linux, Dreamcast, and PSP
Public Member Functions | List of all members
smlt::VirtualFileSystem Class Reference
Inheritance diagram for smlt::VirtualFileSystem:
smlt::RefCounted< VirtualFileSystem > smlt::TwoPhaseConstructed

Public Member Functions

std::list< Path > & search_path ()
 
optional< Pathlocate_file (const Path &filename, bool use_cache=true, bool fail_silently=false) const
 
std::shared_ptr< std::istream > open_file (const Path &filename)
 
std::shared_ptr< std::stringstream > read_file (const Path &filename)
 
std::vector< std::string > read_file_lines (const Path &filename)
 
bool add_search_path (const Path &path)
 
void remove_search_path (const Path &path)
 
std::size_t location_cache_size () const
 
void clear_location_cache ()
 
void set_location_cache_limit (std::size_t entries)
 
- Public Member Functions inherited from smlt::TwoPhaseConstructed
virtual bool init ()
 
virtual void clean_up ()
 

Additional Inherited Members

- Public Types inherited from smlt::RefCounted< VirtualFileSystem >
typedef std::shared_ptr< VirtualFileSystemptr
 
typedef std::weak_ptr< VirtualFileSystemwptr
 
- Static Public Member Functions inherited from smlt::RefCounted< VirtualFileSystem >
static RefCounted< VirtualFileSystem >::ptr create (Args &&... args)
 
static RefCounted< VirtualFileSystem >::ptr create ()
 
- Protected Member Functions inherited from smlt::RefCounted< VirtualFileSystem >
 RefCounted (Args &&...)
 

Member Function Documentation

◆ locate_file()

optional< Path > smlt::VirtualFileSystem::locate_file ( const Path filename,
bool  use_cache = true,
bool  fail_silently = false 
) const

Locates a file on one of the resource paths, throws an IOError if the file cannot be found


The documentation for this class was generated from the following files: