| 193 | }; |
| 194 | |
| 195 | Expected<LoadedObjects> sLoadPath( const std::filesystem::path& path, const Settings::OpenFolder& openFolder, const ProgressCallback& callback ) |
| 196 | { |
| 197 | std::error_code ec; |
| 198 | if ( is_directory( path, ec ) ) |
| 199 | { |
| 200 | if ( !openFolder ) |
| 201 | { |
| 202 | spdlog::info( "Skipping directory {}", utf8string( path ) ); |
| 203 | return {}; |
| 204 | } |
| 205 | |
| 206 | spdlog::info( "Loading directory {}", utf8string( path ) ); |
| 207 | return openFolder( path, callback ); |
| 208 | } |
| 209 | |
| 210 | spdlog::info( "Loading file {}", utf8string( path ) ); |
| 211 | return loadObjectFromFile( path, callback ); |
| 212 | } |
| 213 | |
| 214 | } // anonymous namespace |
| 215 |
no test coverage detected