- Sort Score
- Result 10 results
- Languages All
Results 31 - 40 of 1,050 for getwd (0.09 sec)
-
src/net/http/cgi/cgi_main.go
keys = make([]string, 0, len(envs)) for k := range envs { keys = append(keys, k) } slices.Sort(keys) for _, key := range keys { fmt.Printf("env-%s=%s\r\n", key, envs[key]) } cwd, _ := os.Getwd() fmt.Printf("cwd=%s\r\n", cwd) } type neverEnding byte func (b neverEnding) Read(p []byte) (n int, err error) { for i := range p { p[i] = byte(b) } return len(p), nil }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 3.1K bytes - Viewed (0) -
cluster/gce/gci/configure_helper_test.go
if err != nil { c.t.Fatalf("Failed to create temp directory: %v", err) } c.kubeHome = d c.manifestSources = filepath.Join(c.kubeHome, "kube-manifests", "kubernetes", "gci-trusty") currentPath, err := os.Getwd() if err != nil { c.t.Fatalf("Failed to get current directory: %v", err) } gceDir := filepath.Dir(currentPath) c.manifestTemplateDir = filepath.Join(gceDir, "manifests")
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sat Oct 30 06:23:50 UTC 2021 - 4.8K bytes - Viewed (0) -
src/cmd/internal/objabi/line.go
"strings" ) // WorkingDir returns the current working directory // (or "/???" if the directory cannot be identified), // with "/" as separator. func WorkingDir() string { var path string path, _ = os.Getwd() if path == "" { path = "/???" } return filepath.ToSlash(path) } // AbsFile returns the absolute filename for file in the given directory, // as rewritten by the rewrites argument.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jan 17 23:10:31 UTC 2023 - 3.8K bytes - Viewed (0) -
test/linkobj.go
"log" "os" "os/exec" "strings" ) var pwd, tmpdir string func main() { dir, err := ioutil.TempDir("", "go-test-linkobj-") if err != nil { log.Fatal(err) } pwd, err = os.Getwd() if err != nil { log.Fatal(err) } if err := os.Chdir(dir); err != nil { os.RemoveAll(dir) log.Fatal(err) } tmpdir = dir writeFile("p1.go", ` package p1 func F() {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 19 23:33:25 UTC 2023 - 3.5K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/admission/config.go
apiserverv1 "k8s.io/apiserver/pkg/apis/apiserver/v1" ) func makeAbs(path, base string) (string, error) { if filepath.IsAbs(path) { return path, nil } if len(base) == 0 || base == "." { cwd, err := os.Getwd() if err != nil { return "", err } base = cwd } return filepath.Join(base, path), nil } // ReadAdmissionConfiguration reads the admission configuration at the specified path.
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Jun 29 15:48:39 UTC 2023 - 5.8K bytes - Viewed (0) -
src/os/removeall_test.go
case "aix", "darwin", "ios", "dragonfly", "freebsd", "linux", "netbsd", "openbsd", "illumos", "solaris": break default: t.Skip("skipping for not implemented platforms") } prevDir, err := Getwd() if err != nil { t.Fatalf("Could not get wd: %s", err) } startPath, err := MkdirTemp("", "TestRemoveAllLongPath-") if err != nil { t.Fatalf("Could not create TempDir: %s", err) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Mar 25 19:21:29 UTC 2024 - 12.3K bytes - Viewed (0) -
pkg/volume/util/hostutil/hostutil_test.go
// Switch to volume path and create the socket file // socket file can not have length of more than 108 character // and hence we must use relative path oldDir, _ := os.Getwd() err := os.Chdir(socketDir) if err != nil { return "", err } defer func() { os.Chdir(oldDir) }() _, socketCreateError := net.Listen("unix", "mt.sock")
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Jun 01 16:02:07 UTC 2023 - 5.6K bytes - Viewed (0) -
src/cmd/pack/pack_test.go
ar.addFile(helloFile.Reset()) ar.addFile(goodbyeFile.Reset()) ar.a.File().Close() // Now extract one file. We chdir to the directory of the archive for simplicity. pwd, err := os.Getwd() if err != nil { t.Fatal("os.Getwd: ", err) } err = os.Chdir(dir) if err != nil { t.Fatal("os.Chdir: ", err) } defer func() { err := os.Chdir(pwd) if err != nil { t.Fatal("os.Chdir: ", err)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 04 16:27:35 UTC 2023 - 12.5K bytes - Viewed (0) -
src/os/error_test.go
} if s := checkErrorPredicate("os.IsExist", os.IsExist, err, fs.ErrExist); s != "" { t.Fatal(s) } } func testErrNotExist(t *testing.T, name string) string { originalWD, err := os.Getwd() if err != nil { t.Fatal(err) } f, err := os.Open(name) if err == nil { f.Close() return "Open should have failed" }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 19 00:41:52 UTC 2023 - 4.9K bytes - Viewed (0) -
src/syscall/syscall_js.go
} func Sysctl(key string) (string, error) { if key == "kern.hostname" { return "js", nil } return "", ENOSYS } const ImplementsGetwd = true func Getwd() (wd string, err error) { var buf [PathMax]byte n, err := Getcwd(buf[0:]) if err != nil { return "", err } return string(buf[:n]), nil } func Getuid() int { return jsProcess.Call("getuid").Int() }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Feb 26 21:03:59 UTC 2024 - 6.7K bytes - Viewed (0)