- Sort Score
- Result 10 results
- Languages All
Results 61 - 70 of 1,050 for getwd (0.05 sec)
-
src/internal/testenv/testenv.go
// GOROOT/src/go.mod, and we can report the parent directory of that. // // Notably, this works even if we can't run 'go env GOROOT' as a // subprocess. cwd, err := os.Getwd() if err != nil { gorootErr = fmt.Errorf("finding GOROOT: %w", err) return } dir := cwd for { parent := filepath.Dir(dir) if parent == dir {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 03 16:41:38 UTC 2024 - 15.7K bytes - Viewed (0) -
tools/bug-report/pkg/bugreport/bugreport.go
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Fri Apr 05 20:57:29 UTC 2024 - 20.7K bytes - Viewed (0) -
src/path/filepath/path_windows_test.go
{".", `\\localhost\c$`, `\\localhost\c$`}, } ctmp := tempDirCanonical(t) if err := os.MkdirAll(strings.ReplaceAll(testPath, "{{tmp}}", ctmp), 0777); err != nil { t.Fatal(err) } cwd, err := os.Getwd() if err != nil { t.Fatal(err) } defer func() { err := os.Chdir(cwd) if err != nil { t.Fatal(err) } }() tmpVol := filepath.VolumeName(ctmp) if len(tmpVol) != 2 {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Mar 04 20:38:54 UTC 2024 - 19.6K bytes - Viewed (0) -
src/os/os_windows_test.go
// chdir changes the current working directory to the named directory, // and then restore the original working directory at the end of the test. func chdir(t *testing.T, dir string) { olddir, err := os.Getwd() if err != nil { t.Fatalf("chdir: %v", err) } if err := os.Chdir(dir); err != nil { t.Fatalf("chdir %s: %v", dir, err) } t.Cleanup(func() { if err := os.Chdir(olddir); err != nil {
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/syscall/fs_wasip1.go
} func Ftruncate(fd int, length int64) error { errno := fd_filestat_set_size(int32(fd), filesize(length)) return errnoErr(errno) } const ImplementsGetwd = true func Getwd() (string, error) { return cwd, nil } func Chdir(path string) error { if path == "" { return EINVAL } dir := "/" if !isAbs(path) { dir = cwd }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 15 19:57:43 UTC 2024 - 24.1K bytes - Viewed (0) -
src/syscall/syscall_linux_test.go
"testing" "unsafe" ) // chtmpdir changes the working directory to a new temporary directory and // provides a cleanup function. Used when PWD is read-only. func chtmpdir(t *testing.T) func() { oldwd, err := os.Getwd() if err != nil { t.Fatalf("chtmpdir: %v", err) } d, err := os.MkdirTemp("", "test") if err != nil { t.Fatalf("chtmpdir: %v", err) } if err := os.Chdir(d); err != nil { t.Fatalf("chtmpdir: %v", err)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 23K bytes - Viewed (0) -
src/cmd/doc/doc_test.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Sep 07 19:16:55 UTC 2023 - 31.2K bytes - Viewed (0) -
src/syscall/syscall_windows.go
Stderr = getStdHandle(STD_ERROR_HANDLE) ) func getStdHandle(h int) (fd Handle) { r, _ := GetStdHandle(h) return r } const ImplementsGetwd = true func Getwd() (wd string, err error) { b := make([]uint16, 300) // The path of the current directory may not fit in the initial 300-word // buffer when long path support is enabled. The current directory may also
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Mar 21 11:49:46 UTC 2024 - 52.7K bytes - Viewed (0) -
src/cmd/go/go_test.go
} } } tg.inParallel = true tg.t.Parallel() } // pwd returns the current directory. func (tg *testgoData) pwd() string { tg.t.Helper() wd, err := os.Getwd() if err != nil { tg.t.Fatalf("could not get working directory: %v", err) } return wd } // sleep sleeps for one tick, where a tick is a conservative estimate
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 81.1K bytes - Viewed (0) -
src/cmd/go/internal/fsys/fsys_test.go
// json, and the files, in the archive are laid out in a temp directory // that cwd is set to. func initOverlay(t *testing.T, config string) { t.Helper() // Create a temporary directory and chdir to it. prevwd, err := os.Getwd() if err != nil { t.Fatal(err) } cwd = filepath.Join(t.TempDir(), "root") if err := os.Mkdir(cwd, 0777); err != nil { t.Fatal(err) } if err := os.Chdir(cwd); err != nil { t.Fatal(err) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Sep 20 18:52:11 UTC 2023 - 29.1K bytes - Viewed (0)