- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 27 for chdir (0.04 sec)
-
src/os/os_windows_test.go
type syscallDescriptor = syscall.Handle // 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() {
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/cmd/doc/main.go
flagSet.BoolVar(&short, "short", false, "one-line representation for each symbol") flagSet.Parse(args) telemetry.Inc("doc/invocations") telemetry.CountFlags("doc/flag:", *flag.CommandLine) if chdir != "" { if err := os.Chdir(chdir); err != nil { return err } } var paths []string var symbol, method string // Loop until something is printed. dirs.Reset() for i := 0; ; i++ {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 14 19:41:17 UTC 2024 - 12.2K bytes - Viewed (0) -
src/os/file_plan9.go
dir = "/tmp" } return dir } // Chdir changes the current working directory to the file, // which must be a directory. // If there is an error, it will be of type *PathError. func (f *File) Chdir() error { if err := f.incref("chdir"); err != nil { return err } defer f.decref() if e := syscall.Fchdir(f.fd); e != nil { return &PathError{Op: "chdir", Path: f.name, Err: e} } return nil }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 30 15:35:30 UTC 2024 - 16K bytes - Viewed (0) -
src/os/file.go
return err } return Chmod(name, fi.Mode()|ModeSticky) } // Chdir changes the current working directory to the named directory. // If there is an error, it will be of type *PathError. func Chdir(dir string) error { if e := syscall.Chdir(dir); e != nil { testlog.Open(dir) // observe likely non-existent directory return &PathError{Op: "chdir", Path: dir, Err: e} } if runtime.GOOS == "windows" { getwdCache.Lock()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Apr 26 23:07:37 UTC 2024 - 25.4K bytes - Viewed (0) -
src/cmd/go/main.go
// // 2. A toolchain switch later on reinvokes the new go command with the same arguments. // The parent toolchain has already done the chdir; the child must not try to do it again. func handleChdirFlag() { _, used := lookupCmd(os.Args[1:]) used++ // because of [1:] if used >= len(os.Args) { return } var dir string
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 22 21:09:11 UTC 2024 - 10K bytes - Viewed (0) -
src/cmd/cgo/internal/testplugin/plugin_test.go
} os.Setenv("GOPATH", filepath.Join(GOPATH, "alt")) if err := os.Chdir(altRoot); err != nil { log.Panic(err) } else { prettyPrintf("cd %s\n", altRoot) } os.Setenv("PWD", altRoot) goCmd(nil, "build", "-buildmode=plugin", "-o", filepath.Join(modRoot, "plugin-mismatch.so"), "./plugin-mismatch") os.Setenv("GOPATH", GOPATH) if err := os.Chdir(modRoot); err != nil { log.Panic(err) } else {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 20 15:32:53 UTC 2024 - 12.3K bytes - Viewed (0) -
src/os/exec/exec_test.go
path string err error sync.Once } func chdir(t *testing.T, dir string) { t.Helper() prev, err := os.Getwd() if err != nil { t.Fatal(err) } if err := os.Chdir(dir); err != nil { t.Fatal(err) } t.Logf("Chdir(%#q)", dir) t.Cleanup(func() { if err := os.Chdir(prev); err != nil { // Couldn't chdir back to the original working directory.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Jun 07 20:13:53 UTC 2024 - 48.4K bytes - Viewed (0) -
src/syscall/syscall_linux_test.go
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) } return func() { if err := os.Chdir(oldwd); err != nil { t.Fatalf("chtmpdir: %v", err) } os.RemoveAll(d) } } func touch(t *testing.T, name string) { f, err := os.Create(name)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 23K bytes - Viewed (0) -
src/syscall/syscall_darwin.go
/* * Exposed directly */ //sys Access(path string, mode uint32) (err error) //sys Adjtime(delta *Timeval, olddelta *Timeval) (err error) //sys Chdir(path string) (err error) //sys Chflags(path string, flags int) (err error) //sys Chmod(path string, mode uint32) (err error) //sys Chown(path string, uid int, gid int) (err error) //sys Chroot(path string) (err error)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:16:50 UTC 2024 - 11K bytes - Viewed (0) -
src/cmd/go/script_test.go
gopath := filepath.Join(work, "gopath") must(s.Setenv("GOPATH", gopath)) gopathSrc := filepath.Join(gopath, "src") must(os.MkdirAll(gopathSrc, 0777)) must(s.Chdir(gopathSrc)) return telemetryDir } func scriptEnv(srv *vcstest.Server, srvCertFile string) ([]string, error) { httpURL, err := url.Parse(srv.HTTP.URL) if err != nil { return nil, err }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 03 18:15:22 UTC 2024 - 12.2K bytes - Viewed (0)