Static functions for accessing the file system. More...
#include <FileSystem.h>
Static Public Member Functions | |
static std::vector< std::string > | ListFolder (const std::string &folder_path, const std::string &wildcard_pattern) |
List (not recursively) regular files at folder_path matching wildcard_pattern. More... | |
static void | ValidateFilePath (std::string &filepath, const std::string &default_extension="") |
Convenient function to validate a path before creating a file. More... | |
Static functions for accessing the file system.
Definition at line 17 of file FileSystem.h.
|
static |
List (not recursively) regular files at folder_path matching wildcard_pattern.
std::invalid_argument | if folder does not exist. |
Definition at line 33 of file FileSystem.cpp.
References carla::StringUtil::Match(), and carla::throw_exception().
Referenced by util::OpenDrive::GetAvailableFiles().
|
static |
Convenient function to validate a path before creating a file.
1) Ensures all the parent directories are created if missing. 2) If filepath is missing the extension, default_extension is appended to the path.
Definition at line 18 of file FileSystem.cpp.
Referenced by carla::pointcloud::PointCloudIO::SaveToDisk(), carla::image::io::detail::io_resolver::write_view(), and carla::client::FileTransfer::WriteFile().