package filepathlite
import "internal/filepathlite"
Package filepathlite implements a subset of path/filepath, only using packages which may be imported by "os".
Tests for these functions are in path/filepath.
Index ¶
- Constants
- func Base(path string) string
- func Clean(path string) string
- func Dir(path string) string
- func Ext(path string) string
- func FromSlash(path string) string
- func IsAbs(path string) bool
- func IsLocal(path string) bool
- func IsPathSeparator(c uint8) bool
- func Localize(path string) (string, error)
- func Split(path string) (dir, file string)
- func ToSlash(path string) string
- func VolumeName(path string) string
- func VolumeNameLen(path string) int
Constants ¶
const ( Separator = '/' // OS-specific path separator ListSeparator = ':' // OS-specific path list separator )
Functions ¶
func Base ¶
Base is filepath.Base.
func Clean ¶
Clean is filepath.Clean.
func Dir ¶
Dir is filepath.Dir.
func Ext ¶
Ext is filepath.Ext.
func FromSlash ¶
FromSlash is filepath.ToSlash.
func IsAbs ¶
IsAbs reports whether the path is absolute.
func IsLocal ¶
IsLocal is filepath.IsLocal.
func IsPathSeparator ¶
func Localize ¶
Localize is filepath.Localize.
func Split ¶
Split is filepath.Split.
func ToSlash ¶
ToSlash is filepath.ToSlash.
func VolumeName ¶
VolumeName is filepath.VolumeName.
func VolumeNameLen ¶
VolumeNameLen returns the length of the leading volume name on Windows. It returns 0 elsewhere.
Source Files ¶
path.go path_nonwindows.go path_unix.go
- Version
- v1.23.3
- Published
- Nov 6, 2024
- Platform
- js/wasm
- Imports
- 5 packages
- Last checked
- 1 minute ago –
Tools for package owners.