diff --git a/include/cinder/Utilities.h b/include/cinder/Utilities.h index 8cb45f1ade..9dc92d1ad3 100644 --- a/include/cinder/Utilities.h +++ b/include/cinder/Utilities.h @@ -48,9 +48,9 @@ CI_API fs::path getDocumentsDirectory(); CI_API void limitDirectoryFileCount( const fs::path& directoryPath, size_t maxFileCount, std::function sortFn = []( const fs::path& p1, const fs::path& p2 ) -> bool { return fs::last_write_time( p1 ) > fs::last_write_time( p2 ); } ); //! Searches upwards from \a start (file or directory) for an ancestor directory where \a relativeSearch exists, up to \a maxDepth levels; returns absolute path if found, otherwise empty path. -CI_API std::filesystem::path findAncestorDir( const std::filesystem::path& start, const std::filesystem::path& relativeSearch, int maxDepth = 10 ); +CI_API fs::path findAncestorDir( const fs::path& start, const fs::path& relativeSearch, int maxDepth = 10 ); //! Searches upwards from \a start (file or directory) for an ancestor file where \a relativeSearch exists, up to \a maxDepth levels; returns absolute path if found, otherwise empty path. -CI_API std::filesystem::path findAncestorFile( const std::filesystem::path& start, const std::filesystem::path& relativeSearch, int maxDepth = 10 ); +CI_API fs::path findAncestorFile( const fs::path& start, const fs::path& relativeSearch, int maxDepth = 10 ); //! Launches a path in a web browser CI_API void launchWebBrowser( const Url &url ); diff --git a/src/cinder/Utilities.cpp b/src/cinder/Utilities.cpp index da8ef93283..1ef1e7da6f 100644 --- a/src/cinder/Utilities.cpp +++ b/src/cinder/Utilities.cpp @@ -78,7 +78,7 @@ void limitDirectoryFileCount( const fs::path& directoryPath, size_t maxFileCount } } -std::filesystem::path findAncestorFile( const std::filesystem::path& start, const std::filesystem::path& relativeSearch, int maxDepth ) +fs::path findAncestorFile( const fs::path& start, const fs::path& relativeSearch, int maxDepth ) { size_t parentCt = 0; for( fs::path curPath = start; curPath.has_parent_path() && parentCt <= maxDepth; curPath = curPath.parent_path(), ++parentCt ) { @@ -87,10 +87,10 @@ std::filesystem::path findAncestorFile( const std::filesystem::path& start, cons return testDir; } - return std::filesystem::path(); + return fs::path(); } -std::filesystem::path findAncestorDir( const std::filesystem::path& start, const std::filesystem::path& relativeSearch, int maxDepth ) +fs::path findAncestorDir( const fs::path& start, const fs::path& relativeSearch, int maxDepth ) { size_t parentCt = 0; for( fs::path curPath = start; curPath.has_parent_path() && parentCt <= maxDepth; curPath = curPath.parent_path(), ++parentCt ) { @@ -99,7 +99,7 @@ std::filesystem::path findAncestorDir( const std::filesystem::path& start, const return testDir; } - return std::filesystem::path(); + return fs::path(); } void launchWebBrowser( const Url &url ) diff --git a/src/cinder/app/Platform.cpp b/src/cinder/app/Platform.cpp index 5db6ac5c7a..5c1e29fc52 100644 --- a/src/cinder/app/Platform.cpp +++ b/src/cinder/app/Platform.cpp @@ -146,7 +146,7 @@ const vector& Platform::getAssetDirectories() const void Platform::findAndAddDefaultAssetPath() { - std::filesystem::path assetDir = findAncestorDir( getExecutablePath().parent_path(), "assets", ASSET_SEARCH_DEPTH ); + fs::path assetDir = findAncestorDir( getExecutablePath().parent_path(), "assets", ASSET_SEARCH_DEPTH ); if( ! assetDir.empty() ) addAssetDirectory( assetDir ); }