- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 61 for chdir (0.04 sec)
-
src/syscall/syscall_windows_test.go
err := os.MkdirAll(dirname, 0o700) if err != nil { t.Skipf("MkdirAll failed: %v", err) } err = os.Chdir(dirname) if err != nil { t.Skipf("Chdir failed: %v", err) } // Change out of the temporary directory so that we don't inhibit its // removal during test cleanup. defer os.Chdir(`\`) syscall.Getwd() } func TestGetStartupInfo(t *testing.T) { var si syscall.StartupInfo
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Aug 17 16:33:09 UTC 2023 - 5.7K bytes - Viewed (0) -
src/io/fs/walk_test.go
} 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() errors := make([]error, 0, 10) clear := true markFn := func(path string, entry DirEntry, err error) error {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Nov 18 15:21:18 UTC 2022 - 3K bytes - Viewed (0) -
test/fixedbugs/issue9355.go
// license that can be found in the LICENSE file. package main import ( "fmt" "io/ioutil" "os" "os/exec" "path/filepath" "regexp" ) func main() { err := os.Chdir(filepath.Join("fixedbugs", "issue9355.dir")) check(err) f, err := ioutil.TempFile("", "issue9355-*.o") if err != nil { fmt.Println(err) os.Exit(1) } f.Close()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 19 23:33:25 UTC 2023 - 1.3K bytes - Viewed (0) -
src/os/file_open_wasip1.go
"syscall" ) func open(filePath string, flag int, perm uint32) (int, poll.SysFile, error) { if filePath == "" { return -1, poll.SysFile{}, syscall.EINVAL } absPath := filePath // os.(*File).Chdir is emulated by setting the working directory to the // absolute path that this file was opened at, which is why we have to // resolve and capture it here. if filePath[0] != '/' { wd, err := syscall.Getwd()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Apr 07 23:34:21 UTC 2023 - 818 bytes - Viewed (0) -
test/linkobj.go
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() { println("hello from p1") } `) writeFile("p2.go", `
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 19 23:33:25 UTC 2023 - 3.5K bytes - Viewed (0) -
src/os/exec_posix.go
// If there is no SysProcAttr (ie. no Chroot or changed // UID/GID), double-check existence of the directory we want // to chdir into. We can make the error clearer this way. if attr != nil && attr.Sys == nil && attr.Dir != "" { if _, err := Stat(attr.Dir); err != nil { pe := err.(*PathError) pe.Op = "chdir" return nil, pe } } sysattr := &syscall.ProcAttr{ Dir: attr.Dir, Env: attr.Env,
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Jun 10 22:06:47 UTC 2024 - 3.7K bytes - Viewed (0) -
src/cmd/cgo/internal/teststdio/stdio_test.go
// declaring the same path. modRoot := filepath.Join(GOPATH, "src", "cgostdio") if err := cgotest.OverlayDir(modRoot, "testdata"); err != nil { log.Panic(err) } if err := os.Chdir(modRoot); err != nil { log.Panic(err) } os.Setenv("PWD", modRoot) if err := os.WriteFile("go.mod", []byte("module cgostdio\n"), 0666); err != nil { log.Panic(err) } return m.Run() }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 22 20:56:09 UTC 2023 - 1.8K bytes - Viewed (0) -
src/testing/internal/testdeps/deps.go
l.add("getenv", key) } func (l *testLog) Open(name string) { l.add("open", name) } func (l *testLog) Stat(name string) { l.add("stat", name) } func (l *testLog) Chdir(name string) { l.add("chdir", name) } // add adds the (op, name) pair to the test log. func (l *testLog) add(op, name string) { if strings.Contains(name, "\n") || name == "" { return } l.mu.Lock()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 14:01:23 UTC 2024 - 6.2K bytes - Viewed (0) -
src/runtime/syscall2_solaris.go
// Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package runtime import _ "unsafe" // for go:linkname //go:cgo_import_dynamic libc_chdir chdir "libc.so" //go:cgo_import_dynamic libc_chroot chroot "libc.so" //go:cgo_import_dynamic libc_close close "libc.so" //go:cgo_import_dynamic libc_execve execve "libc.so" //go:cgo_import_dynamic libc_fcntl fcntl "libc.so"
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jun 06 18:49:01 UTC 2023 - 1.8K bytes - Viewed (0) -
hack/boilerplate/boilerplate_test.py
class TestBoilerplate(unittest.TestCase): """ Note: run this test from the hack/boilerplate directory. $ python -m unittest boilerplate_test """ def test_boilerplate(self): os.chdir("test/") class Args: filenames = [] rootdir = "." boilerplate_dir = "../" verbose = True # capture stdout old_stdout = sys.stdout
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Jan 24 09:05:26 UTC 2024 - 1.4K bytes - Viewed (0)