Gems/Atom/Asset/Shader/Code/Source/Editor/ShaderAssetBuilder.cpp
static AZStd::string DiscoverFullPath(AZStd::string_view normalizedRelativePath, AZStd::string_view currentFolderPath, const AZStd::vector<AZStd::string>& includeDirectories)
        {
            AZStd::string fullPath;
            AzFramework::StringFunc::Path::Join(currentFolderPath.data(), normalizedRelativePath.data(), fullPath);
            if (AZ::IO::SystemFile::Exists(fullPath.c_str()))
            {
                return fullPath;
            }

            for (const auto &includeDir : includeDirectories)
            {
                AzFramework::StringFunc::Path::Join(includeDir.c_str(), normalizedRelativePath.data(), fullPath);
                if (AZ::IO::SystemFile::Exists(fullPath.c_str()))
                {
                    return fullPath;
                }
            }

            return "";
        }
//! The search will start in @currentFolderPath.
//! if the file is not found then it searches in order of appearence in @includeDirectories.
//! If the search yields no existing file it returns an empty string.
The search will start in @currentFolderPath.
if the file is not found then it searches in order of appearence in @includeDirectories.
If the search yields no existing file it returns an empty string.
The search will start in @currentFolderPath . if the file is not found then it searches in order of appearence in @includeDirectories . If the search yields no existing file it returns an empty string .
static AZStd::string DiscoverFullPath(AZStd::string_view normalizedRelativePath, AZStd::string_view currentFolderPath, const AZStd::vector<AZStd::string>& includeDirectories)
        {
            AZStd::string fullPath;
            AzFramework::StringFunc::Path::Join(currentFolderPath.data(), normalizedRelativePath.data(), fullPath);
            if (AZ::IO::SystemFile::Exists(fullPath.c_str()))
            {
                return fullPath;
            }
            for (const auto &includeDir : includeDirectories)
            {
                AzFramework::StringFunc::Path::Join(includeDir.c_str(), normalizedRelativePath.data(), fullPath);
                if (AZ::IO::SystemFile::Exists(fullPath.c_str()))
                {
                    return fullPath;
                }
            }
            return "";
        }
static AZStd :: string DiscoverFullPath ( AZStd :: string_view normalizedRelativePath , AZStd :: string_view currentFolderPath , const AZStd :: vector < AZStd :: string > & includeDirectories ) { AZStd :: string fullPath ; AzFramework :: StringFunc :: Path :: Join ( currentFolderPath . data ( ) , normalizedRelativePath . data ( ) , fullPath ) ; if ( AZ :: IO :: SystemFile :: Exists ( fullPath . c_str ( ) ) ) { return fullPath ; } for ( const auto & includeDir : includeDirectories ) { AzFramework :: StringFunc :: Path :: Join ( includeDir . c_str ( ) , normalizedRelativePath . data ( ) , fullPath ) ; if ( AZ :: IO :: SystemFile :: Exists ( fullPath . c_str ( ) ) ) { return fullPath ; } } return " " ; }
The search will start in @currentFolderPath.
The search will start in @currentFolderPath .