- Sort Score
- Result 10 results
- Languages All
Results 131 - 140 of 257 for fchdir (0.16 sec)
-
src/cmd/pack/pack_test.go
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/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/go/internal/script/state.go
} if flushErr := s.flushLog(log); err == nil { err = flushErr } return err } // Chdir changes the State's working directory to the given path. func (s *State) Chdir(path string) error { dir := s.Path(path) if _, err := os.Stat(dir); err != nil { return &fs.PathError{Op: "Chdir", Path: dir, Err: err} } s.pwd = dir s.Setenv("PWD", dir) return nil }
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/runtime/testdata/testprog/syscalls_none.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Mar 21 20:00:09 UTC 2024 - 471 bytes - Viewed (0) -
src/os/path_windows.go
// every time fixLongPath is called with a relative path, so we use a cache. // Note that getwdCache might be outdated if the working directory has been // changed without using os.Chdir, i.e. using syscall.Chdir directly or cgo. // This is fine, as the worst that can happen is that we fail to fix the path. getwdCache.Lock() if getwdCache.dir == "" { // Init the working directory cache.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 07 18:44:48 UTC 2024 - 4.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) -
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) -
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) -
scripts/docs.py
shutil.rmtree(dist_path, ignore_errors=True) current_dir = os.getcwd() os.chdir(lang_path) shutil.rmtree(build_site_dist_path, ignore_errors=True) subprocess.run(["mkdocs", "build", "--site-dir", build_site_dist_path], check=True) shutil.copytree(build_site_dist_path, dist_path, dirs_exist_ok=True) os.chdir(current_dir) typer.secho(f"Successfully built docs for: {lang}", color=typer.colors.GREEN)
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Mon Jan 22 19:26:14 UTC 2024 - 10.9K 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)