- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 98 for sameFile (0.2 sec)
-
src/os/types_plan9.go
func (fs *fileStat) Mode() FileMode { return fs.mode } func (fs *fileStat) ModTime() time.Time { return fs.modTime } func (fs *fileStat) Sys() any { return fs.sys } func sameFile(fs1, fs2 *fileStat) bool { a := fs1.sys.(*syscall.Dir) b := fs2.sys.(*syscall.Dir) return a.Qid.Path == b.Qid.Path && a.Type == b.Type && a.Dev == b.Dev
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sat Oct 08 03:57:40 UTC 2022 - 797 bytes - Viewed (0) -
src/cmd/internal/src/xpos.go
return n < m || n == m && p.lico < q.lico } // SameFile reports whether p and q are positions in the same file. func (p XPos) SameFile(q XPos) bool { return p.index == q.index } // SameFileAndLine reports whether p and q are positions on the same line in the same file. func (p XPos) SameFileAndLine(q XPos) bool { return p.index == q.index && p.lico.SameLine(q.lico) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Sep 01 15:52:41 UTC 2023 - 4.9K 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) -
internal/ioutil/ioutil_test.go
if err != nil { t.Fatalf("Error Stat(): %v", err) } if !SameFile(fi1, fi2) { t.Fatal("Expected the files to be same") } if err = os.WriteFile(tmpFile, []byte("aaa"), 0o644); err != nil { t.Fatal(err) } fi2, err = os.Stat(tmpFile) if err != nil { t.Fatalf("Error Stat(): %v", err) } if SameFile(fi1, fi2) { t.Fatal("Expected the files not to be same") } }
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Wed May 22 23:07:14 UTC 2024 - 5.5K bytes - Viewed (0) -
src/os/os_test.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 83.1K bytes - Viewed (0) -
src/internal/testenv/testenv_test.go
if err != nil { t.Fatalf("testenv.GoTool(): %v", err) } t.Logf("testenv.GoTool() = %q", goTool) gotInfo, err := os.Stat(goTool) if err != nil { t.Fatal(err) } if !os.SameFile(wantInfo, gotInfo) { t.Fatalf("%q is not the same file as %q", absWant, goTool) } } func TestHasGoBuild(t *testing.T) { if !testenv.HasGoBuild() { switch runtime.GOOS { case "js", "wasip1":
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Jan 25 23:12:44 UTC 2024 - 6.1K bytes - Viewed (0) -
src/os/exec/lp_windows.go
// out that the explicit one doesn't match. dotfi, dotfiErr := os.Lstat(dotf) fi, fiErr := os.Lstat(f) if dotfiErr != nil || fiErr != nil || !os.SameFile(dotfi, fi) { return dotf, dotErr } } if !filepath.IsAbs(f) { if execerrdot.Value() != "0" { // If this is the same relative path that we already found,
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Feb 26 21:33:12 UTC 2024 - 6K bytes - Viewed (0) -
src/os/example_test.go
// on the original target path. dstInfo, err := os.Stat(dstAbs) if err != nil { log.Fatal(err) } targetInfo, err := os.Stat(targetPath) if err != nil { log.Fatal(err) } if !os.SameFile(dstInfo, targetInfo) { log.Fatalf("link destination (%s) is not the same file as %s", dstAbs, targetPath) } // Output: // hello.link links to hello.txt } func ExampleUserCacheDir() {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Jan 10 17:35:49 UTC 2024 - 8.4K 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)