mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-11 18:34:58 +01:00
Add test of resource availability
This commit is contained in:
@@ -314,7 +314,7 @@ uint Resource::getTextureImage(const std::string& path, float *aspect_ratio)
|
||||
|
||||
std::string Resource::listDirectory()
|
||||
{
|
||||
// enter icons directory
|
||||
// enter directory
|
||||
auto fs = cmrc::vmix::get_filesystem();
|
||||
cmrc::directory_iterator it = fs.iterate_directory("");
|
||||
cmrc::directory_iterator itend = it.end();
|
||||
@@ -335,3 +335,9 @@ std::string Resource::listDirectory()
|
||||
|
||||
return ls;
|
||||
}
|
||||
|
||||
bool Resource::hasPath(const std::string& path)
|
||||
{
|
||||
auto fs = cmrc::vmix::get_filesystem();
|
||||
return fs.exists(path);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user