- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 658 for getwd (0.28 sec)
-
src/cmd/go/internal/script/state.go
return err } if err := os.WriteFile(name, f.Data, 0666); err != nil { return err } } return nil } // Getwd returns the directory in which to run the next script command. func (s *State) Getwd() string { return s.pwd } // Logf writes output to the script's log without updating its stdout or stderr // buffers. (The output log functions as a kind of meta-stderr.)
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/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) -
src/cmd/go/scriptcmds_test.go
return script.Command( script.CmdUsage{ Summary: "run the platform C compiler", Args: "args...", }, func(s *script.State, args ...string) (script.WaitFunc, error) { b := work.NewBuilder(s.Getwd()) wait, err := cmdExec.Run(s, append(b.GccCmd(".", ""), args...)...) if err != nil { return wait, err } waitAndClean := func(s *script.State) (stdout, stderr string, err error) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Mar 07 18:33:17 UTC 2024 - 3.3K bytes - Viewed (0) -
src/io/fs/walk_test.go
if err != nil { *errors = append(*errors, err) if clear { return nil } return err } return nil } 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()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Nov 18 15:21:18 UTC 2022 - 3K bytes - Viewed (0) -
src/net/http/cgi/cgi_main.go
keys = make([]string, 0, len(envs)) for k := range envs { keys = append(keys, k) } slices.Sort(keys) for _, key := range keys { fmt.Printf("env-%s=%s\r\n", key, envs[key]) } cwd, _ := os.Getwd() fmt.Printf("cwd=%s\r\n", cwd) } type neverEnding byte func (b neverEnding) Read(p []byte) (n int, err error) { for i := range p { p[i] = byte(b) } return len(p), nil }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 3.1K bytes - Viewed (0) -
cluster/gce/gci/configure_helper_test.go
if err != nil { c.t.Fatalf("Failed to create temp directory: %v", err) } c.kubeHome = d c.manifestSources = filepath.Join(c.kubeHome, "kube-manifests", "kubernetes", "gci-trusty") currentPath, err := os.Getwd() if err != nil { c.t.Fatalf("Failed to get current directory: %v", err) } gceDir := filepath.Dir(currentPath) c.manifestTemplateDir = filepath.Join(gceDir, "manifests")
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sat Oct 30 06:23:50 UTC 2021 - 4.8K bytes - Viewed (0) -
src/cmd/internal/objabi/line.go
"strings" ) // WorkingDir returns the current working directory // (or "/???" if the directory cannot be identified), // with "/" as separator. func WorkingDir() string { var path string path, _ = os.Getwd() if path == "" { path = "/???" } return filepath.ToSlash(path) } // AbsFile returns the absolute filename for file in the given directory, // as rewritten by the rewrites argument.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jan 17 23:10:31 UTC 2023 - 3.8K bytes - Viewed (0) -
test/linkobj.go
"log" "os" "os/exec" "strings" ) 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() {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 19 23:33:25 UTC 2023 - 3.5K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/admission/config.go
apiserverv1 "k8s.io/apiserver/pkg/apis/apiserver/v1" ) func makeAbs(path, base string) (string, error) { if filepath.IsAbs(path) { return path, nil } if len(base) == 0 || base == "." { cwd, err := os.Getwd() if err != nil { return "", err } base = cwd } return filepath.Join(base, path), nil } // ReadAdmissionConfiguration reads the admission configuration at the specified path.
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Jun 29 15:48:39 UTC 2023 - 5.8K bytes - Viewed (0) -
pkg/volume/util/hostutil/hostutil_test.go
// Switch to volume path and create the socket file // 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")
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Jun 01 16:02:07 UTC 2023 - 5.6K bytes - Viewed (0)