Пример #1
0
        /// <summary>
        /// Detects the directory separator used in a path segment, or if no directory separator can be detected, defaults to the non-Windows value.
        /// </summary>
        public static string DetectDirectorySeparatorOrInvalid(string pathSegment)
        {
            var directorySeparator = DirectorySeparator.DetectDirectorySeparatorOrDefault(pathSegment, DirectorySeparator.Invalid);

            return(directorySeparator);
        }
        public string DetectDirectorySeparatorOrDefault(string pathSegment, string defaultDirectorySeparator)
        {
            var output = DirectorySeparator.DetectDirectorySeparatorOrDefault(pathSegment, defaultDirectorySeparator);

            return(output);
        }
Пример #3
0
        /// <summary>
        /// Detects the directory separator used in a path segment, or if no directory separator can be detected, defaults to the non-Windows value.
        /// </summary>
        public static string DetectDirectorySeparatorOrNonWindows(string pathSegment)
        {
            var directorySeparator = DirectorySeparator.DetectDirectorySeparatorOrDefault(pathSegment, DirectorySeparator.NonWindows);

            return(directorySeparator);
        }