Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 23 for sameFile (0.21 sec)

  1. 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)
  2. 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)
  3. 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)
  4. 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)
  5. 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)
  6. 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)
  7. 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)
  8. 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)
  9. okhttp/src/main/kotlin/okhttp3/Cookie.kt

            this.secure = true
          }
    
        fun httpOnly() =
          apply {
            this.httpOnly = true
          }
    
        fun sameSite(sameSite: String) =
          apply {
            require(sameSite.trim() == sameSite) { "sameSite is not trimmed" }
            this.sameSite = sameSite
          }
    
        fun build(): Cookie {
          return Cookie(
            name ?: throw NullPointerException("builder.name == null"),
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Sat Apr 06 04:12:05 UTC 2024
    - 23.1K bytes
    - Viewed (0)
  10. src/net/http/cookie.go

    		}
    
    		switch lowerAttr {
    		case "samesite":
    			lowerVal, ascii := ascii.ToLower(val)
    			if !ascii {
    				c.SameSite = SameSiteDefaultMode
    				continue
    			}
    			switch lowerVal {
    			case "lax":
    				c.SameSite = SameSiteLaxMode
    			case "strict":
    				c.SameSite = SameSiteStrictMode
    			case "none":
    				c.SameSite = SameSiteNoneMode
    			default:
    				c.SameSite = SameSiteDefaultMode
    			}
    			continue
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 18:33:05 UTC 2024
    - 13.9K bytes
    - Viewed (0)
Back to top