- Sort Score
- Result 10 results
- Languages All
Results 1 - 8 of 8 for volumeNameLen (0.26 sec)
-
src/internal/filepathlite/path_plan9.go
// IsAbs reports whether the path is absolute. func IsAbs(path string) bool { return stringslite.HasPrefix(path, "/") || stringslite.HasPrefix(path, "#") } // volumeNameLen returns length of the leading volume name on Windows. // It returns 0 elsewhere. func volumeNameLen(path string) int { return 0
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Apr 26 23:07:50 UTC 2024 - 952 bytes - Viewed (0) -
src/path/filepath/symlink.go
package filepath import ( "errors" "internal/filepathlite" "io/fs" "os" "runtime" "syscall" ) func walkSymlinks(path string) (string, error) { volLen := filepathlite.VolumeNameLen(path) pathSeparator := string(os.PathSeparator) if volLen < len(path) && os.IsPathSeparator(path[volLen]) { volLen++ } vol := path[:volLen] dest := vol linksWalked := 0
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Apr 26 23:07:50 UTC 2024 - 3.3K bytes - Viewed (0) -
src/internal/filepathlite/path_unix.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Apr 26 23:07:50 UTC 2024 - 935 bytes - Viewed (0) -
src/internal/filepathlite/path.go
} // VolumeName is filepath.VolumeName. func VolumeName(path string) string { return FromSlash(path[:volumeNameLen(path)]) } // VolumeNameLen returns the length of the leading volume name on Windows. // It returns 0 elsewhere. func VolumeNameLen(path string) int { return volumeNameLen(path)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Apr 26 23:07:50 UTC 2024 - 5.8K bytes - Viewed (0) -
src/internal/filepathlite/path_windows.go
func IsAbs(path string) (b bool) { l := volumeNameLen(path) if l == 0 { return false } // If the volume name starts with a double slash, this is an absolute path. if IsPathSeparator(path[0]) && IsPathSeparator(path[1]) { return true } path = path[l:] if path == "" { return false } return IsPathSeparator(path[0]) } // volumeNameLen returns length of the leading volume name on Windows.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Apr 26 23:07:50 UTC 2024 - 8.5K bytes - Viewed (0) -
src/path/filepath/match.go
} } // cleanGlobPathWindows is windows version of cleanGlobPath. func cleanGlobPathWindows(path string) (prefixLen int, cleaned string) { vollen := filepathlite.VolumeNameLen(path) switch { case path == "": return 0, "." case vollen+1 == len(path) && os.IsPathSeparator(path[len(path)-1]): // /, \, C:\ and C:/ // do nothing to the path return vollen + 1, path
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 8.7K bytes - Viewed (0) -
src/cmd/go/internal/fsys/fsys.go
case "": return "." case string(filepath.Separator): // do nothing to the path return path default: return path[0 : len(path)-1] // chop off trailing separator } } func volumeNameLen(path string) int { isSlash := func(c uint8) bool { return c == '\\' || c == '/' } if len(path) < 2 { return 0 } // with drive letter c := path[0]
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Jun 06 18:35:34 UTC 2024 - 22.7K bytes - Viewed (0) -
src/path/filepath/path.go
targ := Clean(targpath) if sameWord(targ, base) { return ".", nil } base = base[len(baseVol):] targ = targ[len(targVol):] if base == "." { base = "" } else if base == "" && filepathlite.VolumeNameLen(baseVol) > 2 /* isUNC */ { // Treat any targetpath matching `\\host\share` basepath as absolute path. base = string(Separator) } // Can't use IsAbs - `\a` and `a` are both relative in Windows.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 15.5K bytes - Viewed (0)