Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 974 for getwd (0.08 sec)

  1. src/os/error_test.go

    	}
    	if s := checkErrorPredicate("os.IsExist", os.IsExist, err, fs.ErrExist); s != "" {
    		t.Fatal(s)
    	}
    }
    
    func testErrNotExist(t *testing.T, name string) string {
    	originalWD, err := os.Getwd()
    	if err != nil {
    		t.Fatal(err)
    	}
    
    	f, err := os.Open(name)
    	if err == nil {
    		f.Close()
    		return "Open should have failed"
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 19 00:41:52 UTC 2023
    - 4.9K bytes
    - Viewed (0)
  2. src/syscall/syscall_js.go

    }
    
    func Sysctl(key string) (string, error) {
    	if key == "kern.hostname" {
    		return "js", nil
    	}
    	return "", ENOSYS
    }
    
    const ImplementsGetwd = true
    
    func Getwd() (wd string, err error) {
    	var buf [PathMax]byte
    	n, err := Getcwd(buf[0:])
    	if err != nil {
    		return "", err
    	}
    	return string(buf[:n]), nil
    }
    
    func Getuid() int {
    	return jsProcess.Call("getuid").Int()
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 26 21:03:59 UTC 2024
    - 6.7K bytes
    - Viewed (0)
  3. src/syscall/syscall_windows_test.go

    	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
    	err := syscall.GetStartupInfo(&si)
    	if err != nil {
    		// see https://go.dev/issue/31316
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Aug 17 16:33:09 UTC 2023
    - 5.7K bytes
    - Viewed (0)
  4. src/os/path_windows_test.go

    	// is exercised even if long path are supported by the system, else the
    	// function might not be tested at all if/when all test builders support long paths.
    	cwd, err := os.Getwd()
    	if err != nil {
    		t.Fatal("cannot get cwd")
    	}
    	drive := strings.ToLower(filepath.VolumeName(cwd))
    	cwd = strings.ToLower(cwd[len(drive)+1:])
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 23 16:37:32 UTC 2024
    - 8K bytes
    - Viewed (0)
  5. src/cmd/go/internal/vcweb/script.go

    			if !ok {
    				return nil, fmt.Errorf("unrecognized VCS %q", name)
    			}
    			sc.handlerName = name
    			if !h.Available() {
    				return nil, ServerNotInstalledError{name}
    			}
    
    			dir := st.Getwd()
    			if len(args) >= 2 {
    				dir = st.Path(args[1])
    			}
    			sc.handler, err = h.Handler(dir, st.Environ(), sc.server.logger)
    			return nil, err
    		})
    }
    
    func scriptModzip() script.Cmd {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 08 19:37:03 UTC 2022
    - 9K bytes
    - Viewed (0)
  6. pkg/bootstrap/config_test.go

    	expectWorkloadName := "workload"
    	expectExitOnZeroActiveConnections := model.StringBool(true)
    
    	t.Setenv(IstioMetaPrefix+"OWNER", inputOwner)
    	t.Setenv(IstioMetaPrefix+"WORKLOAD_NAME", inputWorkloadName)
    
    	dir, _ := os.Getwd()
    	defer os.Chdir(dir)
    	// prepare a pod label file
    	tempDir := t.TempDir()
    	os.Chdir(tempDir)
    	os.MkdirAll("./etc/istio/pod/", os.ModePerm)
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Mar 28 20:38:02 UTC 2024
    - 9.1K bytes
    - Viewed (0)
  7. src/path/filepath/match_test.go

    		p = strings.Replace(p, `\`, `*\`, 1)
    		p = strings.Replace(p, `:`, `:\`, 1)
    		if err := test.globAbs(tmpDir, p); err != nil {
    			t.Error(err)
    		}
    	}
    
    	// test relative paths
    	wd, err := os.Getwd()
    	if err != nil {
    		t.Fatal(err)
    	}
    	err = os.Chdir(tmpDir)
    	if err != nil {
    		t.Fatal(err)
    	}
    	defer func() {
    		err := os.Chdir(wd)
    		if err != nil {
    			t.Fatal(err)
    		}
    	}()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 22 16:38:19 UTC 2024
    - 8.6K bytes
    - Viewed (0)
  8. src/crypto/tls/bogo_shim_test.go

    		var j struct {
    			Dir string
    		}
    		if err := json.Unmarshal(output, &j); err != nil {
    			t.Fatalf("failed to parse 'go mod download' output: %s", err)
    		}
    		bogoDir = j.Dir
    	}
    
    	cwd, err := os.Getwd()
    	if err != nil {
    		t.Fatal(err)
    	}
    
    	resultsFile := filepath.Join(t.TempDir(), "results.json")
    
    	args := []string{
    		"test",
    		".",
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 11 17:25:39 UTC 2024
    - 12.6K bytes
    - Viewed (0)
  9. src/cmd/dist/util.go

    		// to the user.
    		select {}
    	}
    }
    
    // xgetwd returns the current directory.
    func xgetwd() string {
    	wd, err := os.Getwd()
    	if err != nil {
    		fatalf("%s", err)
    	}
    	return wd
    }
    
    // xrealwd returns the 'real' name for the given path.
    // real is defined as what xgetwd returns in that directory.
    func xrealwd(path string) string {
    	old := xgetwd()
    	if err := os.Chdir(path); err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Feb 23 17:50:29 UTC 2023
    - 11.2K bytes
    - Viewed (0)
  10. src/cmd/cgo/internal/testplugin/plugin_test.go

    		return m.Run()
    	}
    	if !testenv.HasCGO() {
    		globalSkip = func(t *testing.T) { t.Skip("cgo not supported") }
    		return m.Run()
    	}
    
    	cwd, err := os.Getwd()
    	if err != nil {
    		log.Fatal(err)
    	}
    	goroot = filepath.Join(cwd, "../../../../..")
    
    	// Copy testdata into GOPATH/src/testplugin, along with a go.mod file
    	// declaring the same path.
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 20 15:32:53 UTC 2024
    - 12.3K bytes
    - Viewed (0)
Back to top