- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 1,050 for getwd (0.1 sec)
-
src/runtime/testdata/testprog/syscalls_linux.go
} func getcwd() (string, error) { if !syscall.ImplementsGetwd { return "", nil } // Use the syscall to get the current working directory. // This is imperative for checking for OS thread state // after an unshare since os.Getwd might just check the // environment, or use some other mechanism. var buf [4096]byte n, err := syscall.Getcwd(buf[:]) if err != nil { return "", err }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Mar 21 20:00:09 UTC 2024 - 2.2K bytes - Viewed (0) -
src/cmd/link/internal/ld/dwarf_test.go
} if wd, err := os.Getwd(); err == nil { gopathdir := filepath.Join(wd, "testdata", "issue25459") abstractOriginSanity(t, gopathdir, DefaultOpt) } else { t.Fatalf("os.Getwd() failed %v", err) } } func TestAbstractOriginSanityIssue26237(t *testing.T) { testenv.MustHaveGoBuild(t) mustHaveDWARF(t) if wd, err := os.Getwd(); err == nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Feb 08 01:38:11 UTC 2024 - 48.6K bytes - Viewed (0) -
src/os/executable_path.go
//go:build aix || openbsd package os // We query the working directory at init, to use it later to search for the // executable file // errWd will be checked later, if we need to use initWd var initWd, errWd = Getwd() func executable() (string, error) { var exePath string if len(Args) == 0 || Args[0] == "" { return "", ErrNotExist } if IsPathSeparator(Args[0][0]) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 28 18:17:57 UTC 2021 - 2.3K bytes - Viewed (0) -
src/cmd/go/internal/script/state.go
return err } if err := os.WriteFile(name, f.Data, 0666); err != nil { return err } } return nil } // Getwd returns the directory in which to run the next script command. func (s *State) Getwd() string { return s.pwd } // Logf writes output to the script's log without updating its stdout or stderr // buffers. (The output log functions as a kind of meta-stderr.)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jan 31 20:33:02 UTC 2023 - 6.9K bytes - Viewed (0) -
src/os/executable_test.go
} return os.SameFile(fi1, fi2) } func init() { if e := os.Getenv(executable_EnvVar); e != "" { // first chdir to another path dir := "/" if runtime.GOOS == "windows" { cwd, err := os.Getwd() if err != nil { panic(err) } dir = filepath.VolumeName(cwd) } os.Chdir(dir) if ep, err := os.Executable(); err != nil { fmt.Fprint(os.Stderr, "ERROR: ", err) } else {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Sep 05 23:35:32 UTC 2023 - 3.4K bytes - Viewed (0) -
src/path/filepath/path_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("getwd %s: %v", dir, 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: Fri Mar 22 16:38:19 UTC 2024 - 47.1K bytes - Viewed (0) -
src/cmd/go/scriptcmds_test.go
return script.Command( script.CmdUsage{ Summary: "run the platform C compiler", Args: "args...", }, func(s *script.State, args ...string) (script.WaitFunc, error) { b := work.NewBuilder(s.Getwd()) wait, err := cmdExec.Run(s, append(b.GccCmd(".", ""), args...)...) if err != nil { return wait, err } waitAndClean := func(s *script.State) (stdout, stderr string, err error) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Mar 07 18:33:17 UTC 2024 - 3.3K bytes - Viewed (0) -
src/go/build/build_test.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 15 16:24:01 UTC 2023 - 23.9K bytes - Viewed (0) -
src/net/http/cgi/host_test.go
} } func TestDir(t *testing.T) { testenv.MustHaveExec(t) cwd, _ := os.Getwd() h := &Handler{ Path: os.Args[0], Root: "/test.cgi", Dir: cwd, } expectedMap := map[string]string{ "cwd": cwd, } runCgiTest(t, h, "GET /test.cgi HTTP/1.0\nHost: example.com\n\n", expectedMap) cwd, _ = os.Getwd() cwd, _ = filepath.Split(os.Args[0]) h = &Handler{ Path: os.Args[0],
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/io/fs/walk_test.go
if err != nil { *errors = append(*errors, err) if clear { return nil } return err } return nil } func TestWalkDir(t *testing.T) { tmpDir := t.TempDir() origDir, err := os.Getwd() if err != nil { t.Fatal("finding working dir:", err) } if err = os.Chdir(tmpDir); err != nil { t.Fatal("entering temp dir:", err) } defer os.Chdir(origDir) fsys := makeTree()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Nov 18 15:21:18 UTC 2022 - 3K bytes - Viewed (0)