- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 39 for sameFile (0.28 sec)
-
src/os/os_windows_test.go
t.Errorf("SameFile(%v, %v) = true; want false", f1, f2) } // Check that os.SameFile works with a mix of os.ReadDir and os.Stat files. f1s, err := os.Stat(pathA) if err != nil { t.Fatal(err) } f2s, err := os.Stat(pathB) if err != nil { t.Fatal(err) } if !os.SameFile(f1, f1s) { t.Errorf("SameFile(%v, %v) = false; want true", f1, f1s) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 41.8K bytes - Viewed (0) -
src/os/types_windows.go
idxhi: d.FileIndexHigh, idxlo: d.FileIndexLow, ReparseTag: reparseTag, // fileStat.path is used by os.SameFile to decide if it needs // to fetch vol, idxhi and idxlo. But these are already set, // so set fileStat.path to "" to prevent os.SameFile doing it again. }, nil } // newFileStatFromWin32FileAttributeData copies all required information
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 07 18:44:48 UTC 2024 - 11.7K bytes - Viewed (0) -
internal/ioutil/ioutil.go
bufp := copyBufPool.Get().(*[]byte) buf := *bufp defer copyBufPool.Put(bufp) return io.CopyBuffer(dst, src, buf) } // SameFile returns if the files are same. func SameFile(fi1, fi2 os.FileInfo) bool { if !os.SameFile(fi1, fi2) { return false } if !fi1.ModTime().Equal(fi2.ModTime()) { return false } if fi1.Mode() != fi2.Mode() { return false }
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Wed May 22 23:07:14 UTC 2024 - 10.2K bytes - Viewed (0) -
src/cmd/dist/util.go
func errprintf(format string, args ...interface{}) { fmt.Fprintf(os.Stderr, format, args...) } // xsamefile reports whether f1 and f2 are the same file (or dir). func xsamefile(f1, f2 string) bool { fi1, err1 := os.Stat(f1) fi2, err2 := os.Stat(f2) if err1 != nil || err2 != nil { return f1 == f2 } return os.SameFile(fi1, fi2) } func xgetgoarm() string {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Feb 23 17:50:29 UTC 2023 - 11.2K bytes - Viewed (0) -
src/net/http/cgi/host_test.go
} m[k] = v } for key, expected := range expectedMap { got := m[key] if key == "cwd" { // For Windows. golang.org/issue/4645. fi1, _ := os.Stat(got) fi2, _ := os.Stat(expected) if os.SameFile(fi1, fi2) { got = expected } } if got != expected { t.Errorf("for key %q got %q; expected %q", key, got, expected) } } for _, check := range checks { check(m) } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Mar 04 18:29:59 UTC 2024 - 13.3K bytes - Viewed (0) -
src/os/file_unix.go
if ofi, err := Lstat(oldname); err != nil { if pe, ok := err.(*PathError); ok { err = pe.Err } return &LinkError{"rename", oldname, newname, err} } else if newname == oldname || !SameFile(fi, ofi) { return &LinkError{"rename", oldname, newname, syscall.EEXIST} } } err = ignoringEINTR(func() error { return syscall.Rename(oldname, newname) }) if err != nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 29 13:52:34 UTC 2024 - 14.9K bytes - Viewed (0) -
src/cmd/go/internal/cfg/cfg.go
func isSameDir(dir1, dir2 string) bool { if dir1 == dir2 { return true } info1, err1 := os.Stat(dir1) info2, err2 := os.Stat(dir2) return err1 == nil && err2 == nil && os.SameFile(info1, info2) } // isGOROOT reports whether path looks like a GOROOT. // // It does this by looking for the path/pkg/tool directory, // which is necessary for useful operation of the cmd/go tool,
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 24 17:13:51 UTC 2024 - 19.3K bytes - Viewed (0) -
src/path/filepath/path_test.go
continue } abspath, err := filepath.Abs(path) if err != nil { t.Errorf("Abs(%q) error: %v", path, err) continue } absinfo, err := os.Stat(abspath) if err != nil || !os.SameFile(absinfo, info) { t.Errorf("Abs(%q)=%q, not the same file", path, abspath) } if !filepath.IsAbs(abspath) { t.Errorf("Abs(%q)=%q, not an absolute path", path, abspath) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Mar 22 16:38:19 UTC 2024 - 47.1K bytes - Viewed (0) -
api/except.txt
pkg os, func Lstat(string) (FileInfo, error) pkg os, func Mkdir(string, FileMode) error pkg os, func MkdirAll(string, FileMode) error pkg os, func OpenFile(string, int, FileMode) (*File, error) pkg os, func SameFile(FileInfo, FileInfo) bool pkg os, func Stat(string) (FileInfo, error) pkg os, method (*File) Chmod(FileMode) error pkg os, method (*File) Readdir(int) ([]FileInfo, error) pkg os, method (*File) Stat() (FileInfo, error)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 25 00:13:30 UTC 2023 - 34.6K bytes - Viewed (0) -
src/net/http/cookie_test.go
}, { &Cookie{Name: "cookie-12", Value: "samesite-default", SameSite: SameSiteDefaultMode}, "cookie-12=samesite-default", }, { &Cookie{Name: "cookie-13", Value: "samesite-lax", SameSite: SameSiteLaxMode}, "cookie-13=samesite-lax; SameSite=Lax", }, { &Cookie{Name: "cookie-14", Value: "samesite-strict", SameSite: SameSiteStrictMode}, "cookie-14=samesite-strict; SameSite=Strict", }, {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 22 18:33:05 UTC 2024 - 26.2K bytes - Viewed (0)