Versions in this module Expand all Collapse all v0 v0.0.1 Mar 15, 2025 Changes in this version + const DirectorySeparator + const ExtensionCjs + const ExtensionCts + const ExtensionDcts + const ExtensionDmts + const ExtensionDts + const ExtensionJs + const ExtensionJson + const ExtensionJsx + const ExtensionMjs + const ExtensionMts + const ExtensionTs + const ExtensionTsBuildInfo + const ExtensionTsx + var AllSupportedExtensions = [][]string + var AllSupportedExtensionsWithJson = slices.Concat(AllSupportedExtensions, [][]string{ ... }) + var SupportedJSExtensions = [][]string + var SupportedJSExtensionsFlat = []string + var SupportedTSExtensions = [][]string + var SupportedTSExtensionsFlat = []string + var SupportedTSExtensionsWithJson = slices.Concat(SupportedTSExtensions, [][]string{ ... }) + var SupportedTSExtensionsWithJsonFlat = slices.Concat(SupportedTSExtensionsFlat, []string{ ... }) + func ChangeExtension(path string, newExtension string) string + func CombinePaths(firstPath string, paths ...string) string + func ComparePaths(a string, b string, options ComparePathsOptions) int + func ComparePathsCaseInsensitive(a string, b string, currentDirectory string) int + func ComparePathsCaseSensitive(a string, b string, currentDirectory string) int + func ContainsPath(parent string, child string, options ComparePathsOptions) bool + func ConvertToRelativePath(absoluteOrRelativePath string, options ComparePathsOptions) string + func EnsureTrailingDirectorySeparator(path string) string + func ExtensionIsTs(ext string) bool + func FileExtensionIs(path string, extension string) bool + func FileExtensionIsOneOf(path string, extensions []string) bool + func ForEachAncestorDirectoryPath[T any](directory Path, callback func(directory Path) (result T, stop bool)) (result T, ok bool) + func ForEachAncestorDirectory[T any](directory string, callback func(directory string) (result T, stop bool)) (result T, ok bool) + func GetAnyExtensionFromPath(path string, extensions []string, ignoreCase bool) string + func GetBaseFileName(path string) string + func GetCanonicalFileName(fileName string, useCaseSensitiveFileNames bool) string + func GetDeclarationFileExtension(fileName string) string + func GetDirectoryPath(path string) string + func GetEncodedRootLength(path string) int + func GetNormalizedAbsolutePath(fileName string, currentDirectory string) string + func GetNormalizedPathComponents(path string, currentDirectory string) []string + func GetPathComponents(path string, currentDirectory string) []string + func GetPathComponentsRelativeTo(from string, to string, options ComparePathsOptions) []string + func GetPathFromPathComponents(pathComponents []string) string + func GetRelativePathFromDirectory(fromDirectory string, to string, options ComparePathsOptions) string + func GetRelativePathToDirectoryOrUrl(directoryPathOrUrl string, relativeOrAbsolutePath string, ...) string + func GetRootLength(path string) int + func HasExtension(fileName string) bool + func HasImplementationTSFileExtension(path string) bool + func HasTSFileExtension(path string) bool + func HasTrailingDirectorySeparator(path string) bool + func IsDeclarationFileName(fileName string) bool + func IsDiskPathRoot(path string) bool + func IsExternalModuleNameRelative(moduleName string) bool + func IsRootedDiskPath(path string) bool + func IsUrl(path string) bool + func NormalizePath(path string) string + func NormalizeSlashes(path string) string + func PathIsAbsolute(path string) bool + func PathIsRelative(path string) bool + func RemoveExtension(path string, extension string) string + func RemoveFileExtension(path string) string + func RemoveTrailingDirectorySeparator(path string) string + func RemoveTrailingDirectorySeparators(path string) string + func ResolvePath(path string, paths ...string) string + func ToFileNameLowerCase(fileName string) string + func TryExtractTSExtension(fileName string) string + func TryGetExtensionFromPath(p string) string + type ComparePathsOptions struct + CurrentDirectory string + UseCaseSensitiveFileNames bool + func (o ComparePathsOptions) GetComparer() func(a, b string) int + type Path string + func ToPath(fileName string, basePath string, useCaseSensitiveFileNames bool) Path + func (p Path) EnsureTrailingDirectorySeparator() Path + func (p Path) GetDirectoryPath() Path + func (p Path) RemoveTrailingDirectorySeparator() Path