Bloom.BloomFileLocator.GetOptionalBrandingFile C# (CSharp) Method

GetOptionalBrandingFile() public static method

Gets a file in the specified branding folder
public static GetOptionalBrandingFile ( string brandingNameOrFolderPath, string fileName ) : string
brandingNameOrFolderPath string Normally, the branding is just a name, which we look up in the official branding folder // but unit tests can instead provide a path to the folder. ///
fileName string
return string
        public static string GetOptionalBrandingFile(string brandingNameOrFolderPath, string fileName)
        {
            if(Path.IsPathRooted(brandingNameOrFolderPath)) //if it looks like a path
            {
                var path = Path.Combine(brandingNameOrFolderPath, fileName);
                if(RobustFile.Exists(path))
                    return path;
                return null;
            }
            return BloomFileLocator.GetFileDistributedWithApplication(true, "branding", brandingNameOrFolderPath, fileName);
        }