FdkBaseLib 2.1.1
All Classes Namespaces Files Functions Variables Enumerations Enumerator Pages
fdk::PluginRegistry::Directory Struct Reference

Public Member Functions

 Directory (const std::filesystem::path &filepath)
 Splits filepath to derive the directory parent path and name.
 
 Directory (const std::string &_path, const std::string &_name)
 Directly set the path and name of the directory.
 
 operator bool () const
 
bool find (const std::string &searchTerm) const
 
void load (bool force=false)
 Load the contents of the directory.
 
void reload ()
 Force the directory to reload its contents.
 

Public Attributes

std::string path
 Directory's parent path.
 
std::string name
 Directory's name.
 
bool loaded = false
 Has the directory's file list been loaded?
 
bool ok = true
 Is directory valid? Will be false if load failed for any reason.
 
StringSet contents
 Set of child names.
 

Member Function Documentation

◆ find()

bool fdk::PluginRegistry::Directory::find ( const std::string &  searchTerm) const

Returns true if searchTerm is in this directory's contents list. If the directory has not been loaded yet, do it now.



©2024 The Foundry Visionmongers, Ltd. All Rights Reserved.
www.foundry.com