- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 18 for chdir (0.04 sec)
-
src/syscall/pwd_plan9.go
return } wdSet = true wdStr = wd return wd, nil } func Chdir(path string) error { // If Chdir is to a relative path, sync working dir first if fixwd(path) { defer runtime.UnlockOSThread() } wdmu.Lock() defer wdmu.Unlock() runtime.LockOSThread() defer runtime.UnlockOSThread() if err := chdir(path); err != nil { return err } wd, err := getwd() if err != nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Feb 26 21:03:59 UTC 2024 - 2.3K bytes - Viewed (0) -
src/cmd/go/testdata/script/test_cache_inputs.txt
stdout '\(cached\)' # Files should be tracked even if the test changes its working directory. go test testcache -run=Chdir go test testcache -run=Chdir stdout '\(cached\)' cp 6x.txt testcache/file.txt go test testcache -run=Chdir ! stdout '\(cached\)' go test testcache -run=Chdir stdout '\(cached\)' # The content of files should affect caching, provided that the mtime also changes.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sat Mar 09 22:23:53 UTC 2024 - 6.3K bytes - Viewed (0) -
src/runtime/testdata/testprog/lockosthread.go
println("unshare not permitted") os.Exit(0) } println("failed to unshare fs:", err.Error()) os.Exit(1) } // Chdir to somewhere else on this thread. // On systems other than Linux, this is a no-op. if err := chdir(os.TempDir()); err != nil { println("failed to chdir:", err.Error()) os.Exit(1) } // The state on this thread is now considered "tainted", but it
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Mar 21 20:00:09 UTC 2024 - 6.6K bytes - Viewed (0) -
cmd/gotemplate/gotemplate_test.go
for fileName, fileContent := range tt.files { err := os.WriteFile(path.Join(tmp, fileName), []byte(fileContent), 0666) require.NoError(t, err, "create input file") } defer os.Chdir(cwd) require.NoError(t, os.Chdir(tmp), "change into tmp directory") in := strings.NewReader(tt.in) var out bytes.Buffer err := generate(in, &out, tt.data) if tt.expectedErr == "" { require.NoError(t, err, "expand template")
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Jan 22 13:43:42 UTC 2024 - 2.7K bytes - Viewed (0) -
src/runtime/testdata/testprog/syscalls_linux.go
} func unshareFs() error { err := syscall.Unshare(syscall.CLONE_FS) if testenv.SyscallIsNotSupported(err) { return errNotPermitted } return err } func chdir(path string) error { return syscall.Chdir(path)
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/os/file_posix.go
} return nil } // 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.checkValid("chdir"); err != nil { return err } if e := f.pfd.Fchdir(); e != nil { return f.wrapErr("chdir", e) } return nil }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Feb 26 21:33:12 UTC 2024 - 7.1K 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/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/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)