- Sort Score
- Result 10 results
- Languages All
Results 41 - 50 of 232 for chdir (0.19 sec)
-
pkg/volume/util/hostutil/hostutil_test.go
// socket file can not have length of more than 108 character // and hence we must use relative path oldDir, _ := os.Getwd() err := os.Chdir(socketDir) if err != nil { return "", err } defer func() { os.Chdir(oldDir) }() _, socketCreateError := net.Listen("unix", "mt.sock") return testSocketFile, socketCreateError } func TestGetFileType(t *testing.T) {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Jun 01 16:02:07 UTC 2023 - 5.6K bytes - Viewed (0) -
src/path/filepath/example_unix_walk_test.go
} func ExampleWalk() { tmpDir, err := prepareTestDirTree("dir/to/walk/skip") if err != nil { fmt.Printf("unable to create test dir tree: %v\n", err) return } defer os.RemoveAll(tmpDir) os.Chdir(tmpDir) subDirToSkip := "skip" fmt.Println("On Unix:") err = filepath.Walk(".", func(path string, info fs.FileInfo, err error) error { if err != nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 28 18:17:57 UTC 2021 - 1.5K 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/syscall/exec_libc.go
} err1 = setgid(uintptr(cred.Gid)) if err1 != 0 { goto childerror } err1 = setuid(uintptr(cred.Uid)) if err1 != 0 { goto childerror } } // Chdir if dir != nil { err1 = chdir(uintptr(unsafe.Pointer(dir))) if err1 != 0 { goto childerror } } // Pass 1: look for fd[i] < i and move those up above len(fd)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Sep 29 18:51:35 UTC 2023 - 8.2K bytes - Viewed (0) -
test/fixedbugs/bug369.go
// Test that compiling with optimization turned on produces faster code. package main import ( "fmt" "io/ioutil" "os" "os/exec" "path/filepath" ) func main() { err := os.Chdir(filepath.Join(".", "fixedbugs", "bug369.dir")) check(err) tmpDir, err := ioutil.TempDir("", "bug369") check(err) defer os.RemoveAll(tmpDir) tmp := func(name string) string {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 19 23:33:25 UTC 2023 - 1.6K bytes - Viewed (0) -
src/cmd/dist/util.go
// real is defined as what xgetwd returns in that directory. func xrealwd(path string) string { old := xgetwd() if err := os.Chdir(path); err != nil { fatalf("chdir %s: %v", path, err) } real := xgetwd() if err := os.Chdir(old); err != nil { fatalf("chdir %s: %v", old, err) } return real } // isdir reports whether p names an existing directory. func isdir(p string) bool {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Feb 23 17:50:29 UTC 2023 - 11.2K bytes - Viewed (0) -
src/syscall/asm_solaris_amd64.s
// TEXT ·sysvicall6(SB),NOSPLIT,$0 JMP runtime·syscall_sysvicall6(SB) TEXT ·rawSysvicall6(SB),NOSPLIT,$0 JMP runtime·syscall_rawsysvicall6(SB) TEXT ·chdir(SB),NOSPLIT,$0 JMP runtime·syscall_chdir(SB) TEXT ·chroot1(SB),NOSPLIT,$0 JMP runtime·syscall_chroot(SB) TEXT ·closeFD(SB),NOSPLIT,$0 JMP runtime·syscall_close(SB) TEXT ·dup2child(SB),NOSPLIT,$0
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Mar 15 17:21:30 UTC 2023 - 1.8K bytes - Viewed (0) -
src/runtime/syscall_aix.go
package runtime import "unsafe" // This file handles some syscalls from the syscall package // Especially, syscalls use during forkAndExecInChild which must not split the stack //go:cgo_import_dynamic libc_chdir chdir "libc.a/shr_64.o" //go:cgo_import_dynamic libc_chroot chroot "libc.a/shr_64.o" //go:cgo_import_dynamic libc_dup2 dup2 "libc.a/shr_64.o" //go:cgo_import_dynamic libc_execve execve "libc.a/shr_64.o"
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Dec 14 17:22:18 UTC 2023 - 6.3K bytes - Viewed (0) -
src/cmd/cgo/internal/testlife/life_test.go
// declaring the same path. modRoot := filepath.Join(GOPATH, "src", "cgolife") 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 cgolife\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.5K bytes - Viewed (0) -
src/os/os_test.go
if err != nil { t.Fatalf("Getwd: %s", err) } defer Chdir(wd) fd, err := Open(".") if err != nil { t.Fatalf("Open .: %s", err) } defer fd.Close() if err := Chdir("/"); err != nil { t.Fatalf("Chdir /: %s", err) } if err := fd.Chdir(); err != nil { t.Fatalf("fd.Chdir: %s", err) } wdNew, err := Getwd() if err != nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 83.1K bytes - Viewed (0)