NormalizePathSeparator() static public method

Canonicalizes the path: all '/' and '\' are mapped to Path.DirectorySeparatorChar (and Path.AltDirectorySeparatorChar will also be transformed).
static public NormalizePathSeparator ( string path, bool ensureTrailingBackslash ) : string
path string The path to standardize (must be not be null). It is trimmed and if the path is empty, the empty string is returned.
ensureTrailingBackslash bool /// Ensures that the normalized path will end with a . /// It should be true for path to directories because we consider that a directory path SHOULD end with /// the slash as often as possible. /// When is empty, this is not applied to preserve the fact that the string is empty. ///
return string
        static string NormalizeRootLogPath(string value)
        {
            if (!Path.IsPathRooted(value))
            {
#if NET451 || NET46
                value = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, value);
#else
                value = Microsoft.Extensions.PlatformAbstractions.PlatformServices.Default.Application.ApplicationBasePath;
#endif
            }
            value = FileUtil.NormalizePathSeparator(value, true);
            return(value);
        }