コード例 #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);
        }
コード例 #2
0
        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);
        }