- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 552 for getwd (0.17 sec)
-
src/syscall/pwd_plan9.go
} } return false } // goroutine-specific getwd func getwd() (wd string, err error) { fd, err := open(".", O_RDONLY) if err != nil { return "", err } defer Close(fd) return Fd2path(fd) } func Getwd() (wd string, err error) { wdmu.Lock() defer wdmu.Unlock() if wdSet { return wdStr, nil } wd, err = getwd() if err != nil { return } wdSet = true wdStr = wd
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/vendor/golang.org/x/sys/plan9/pwd_go15_plan9.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 19 23:33:33 UTC 2023 - 373 bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/sys/plan9/pwd_plan9.go
// Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build !go1.5 package plan9 func fixwd() { } func Getwd() (wd string, err error) { fd, err := open(".", O_RDONLY) if err != nil { return "", err } defer Close(fd) return Fd2path(fd) } func Chdir(path string) error { return chdir(path)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 19 23:33:33 UTC 2023 - 413 bytes - Viewed (0) -
src/os/executable_solaris.go
package os import ( "syscall" _ "unsafe" // for linkname ) //go:linkname executablePath var executablePath string // set by sysauxv in ../runtime/os3_solaris.go var initCwd, initCwdErr = Getwd() func executable() (string, error) { path := executablePath if len(path) == 0 { path, err := syscall.Getexecname() if err != nil { return path, err } } if len(path) > 0 && path[0] != '/' {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 15 19:57:43 UTC 2024 - 757 bytes - Viewed (0) -
src/os/executable_darwin.go
package os import ( "errors" _ "unsafe" // for linkname ) //go:linkname executablePath var executablePath string // set by ../runtime/os_darwin.go var initCwd, initCwdErr = Getwd() func executable() (string, error) { ep := executablePath if len(ep) == 0 { return ep, errors.New("cannot find executable path") } if ep[0] != '/' { if initCwdErr != nil { return ep, initCwdErr
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 15 19:57:43 UTC 2024 - 675 bytes - Viewed (0) -
src/cmd/compile/internal/test/pgo_devirtualize_test.go
} } // TestPGODevirtualize tests that specific functions are devirtualized when PGO // is applied to the exact source that was profiled. func TestPGODevirtualize(t *testing.T) { wd, err := os.Getwd() if err != nil { t.Fatalf("error getting wd: %v", err) } srcDir := filepath.Join(wd, "testdata", "pgo", "devirtualize") // Copy the module to a scratch location so we can add a go.mod.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Feb 15 21:30:35 UTC 2024 - 8.5K bytes - Viewed (0) -
src/os/path_windows.go
if !filepathlite.IsAbs(path) { // If the path is relative, we need to prepend the working directory // plus a separator to the path before we can determine if it's too long. // We don't want to call syscall.Getwd here, as that call is expensive to do // 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
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 07 18:44:48 UTC 2024 - 4.7K bytes - Viewed (0) -
cmd/gotemplate/gotemplate_test.go
}, "include": { in: `{{include "test.txt" | indent 2}}`, files: map[string]string{"test.txt": "hello\nworld"}, expected: "hello\n world", }, } { cwd, err := os.Getwd() require.NoError(t, err) t.Run(name, func(t *testing.T) { tmp := t.TempDir() for fileName, fileContent := range tt.files { err := os.WriteFile(path.Join(tmp, fileName), []byte(fileContent), 0666)
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 getcwd() (string, error) { if !syscall.ImplementsGetwd { return "", nil } // Use the syscall to get the current working directory. // This is imperative for checking for OS thread state // after an unshare since os.Getwd might just check the // environment, or use some other mechanism. var buf [4096]byte n, err := syscall.Getcwd(buf[:]) if err != nil { return "", err }
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/executable_test.go
} return os.SameFile(fi1, fi2) } func init() { if e := os.Getenv(executable_EnvVar); e != "" { // first chdir to another path dir := "/" if runtime.GOOS == "windows" { cwd, err := os.Getwd() if err != nil { panic(err) } dir = filepath.VolumeName(cwd) } os.Chdir(dir) if ep, err := os.Executable(); err != nil { fmt.Fprint(os.Stderr, "ERROR: ", err) } else {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Sep 05 23:35:32 UTC 2023 - 3.4K bytes - Viewed (0)