| 685 | } |
| 686 | |
| 687 | func ToPath(fileName string, basePath string, useCaseSensitiveFileNames bool) Path { |
| 688 | var nonCanonicalizedPath string |
| 689 | if IsRootedDiskPath(fileName) { |
| 690 | nonCanonicalizedPath = NormalizePath(fileName) |
| 691 | } else { |
| 692 | nonCanonicalizedPath = GetNormalizedAbsolutePath(fileName, basePath) |
| 693 | } |
| 694 | return Path(GetCanonicalFileName(nonCanonicalizedPath, useCaseSensitiveFileNames)) |
| 695 | } |
| 696 | |
| 697 | func RemoveTrailingDirectorySeparator(path string) string { |
| 698 | if HasTrailingDirectorySeparator(path) { |