Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 1,050 for getwd (0.04 sec)

  1. src/os/getwd.go

    var getwdCache struct {
    	sync.Mutex
    	dir string
    }
    
    // Getwd returns a rooted path name corresponding to the
    // current directory. If the current directory can be
    // reached via multiple paths (due to symbolic links),
    // Getwd may return any one of them.
    func Getwd() (dir string, err error) {
    	if runtime.GOOS == "windows" || runtime.GOOS == "plan9" {
    		return syscall.Getwd()
    	}
    
    	// Clumsy but widespread kludge:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Sep 28 06:28:02 UTC 2020
    - 2.5K bytes
    - Viewed (0)
  2. 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)
  3. src/cmd/vendor/golang.org/x/sys/plan9/pwd_go15_plan9.go

    // license that can be found in the LICENSE file.
    
    //go:build go1.5
    
    package plan9
    
    import "syscall"
    
    func fixwd() {
    	syscall.Fixwd()
    }
    
    func Getwd() (wd string, err error) {
    	return syscall.Getwd()
    }
    
    func Chdir(path string) error {
    	return syscall.Chdir(path)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 23:33:33 UTC 2023
    - 373 bytes
    - Viewed (0)
  4. src/cmd/compile/internal/ssa/testdata/i22600.gdb-dbg-race.nexts

      src/cmd/compile/internal/ssa/testdata/i22600.go
    8:	func test() {
    9:		pwd, err := os.Getwd()
    10:		if err != nil {
    14:		fmt.Println(pwd)
    15:	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 23 18:05:07 UTC 2018
    - 149 bytes
    - Viewed (0)
  5. src/cmd/compile/internal/ssa/testdata/i22600.dlv-dbg-race.nexts

      ./testdata/i22600.go
    8:	func test() {
    9:		pwd, err := os.Getwd()
    10:		if err != nil {
    14:		fmt.Println(pwd)
    15:	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 23 18:05:07 UTC 2018
    - 122 bytes
    - Viewed (0)
  6. src/cmd/compile/internal/ssa/testdata/i22600.go

    package main
    
    import (
    	"fmt"
    	"os"
    )
    
    func test() {
    	pwd, err := os.Getwd()
    	if err != nil {
    		fmt.Println(err)
    		os.Exit(1)
    	}
    	fmt.Println(pwd)
    }
    
    func main() {
    	growstack() // Use stack early to prevent growth during test, which confuses gdb
    	test()
    }
    
    var snk string
    
    //go:noinline
    func growstack() {
    	snk = fmt.Sprintf("%#v,%#v,%#v", 1, true, "cat")
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 23 18:05:07 UTC 2018
    - 358 bytes
    - Viewed (0)
  7. 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)
  8. 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)
  9. src/os/exec/exec_posix_test.go

    	"reflect"
    	"runtime"
    	"strconv"
    	"strings"
    	"syscall"
    	"testing"
    	"time"
    )
    
    func init() {
    	registerHelperCommand("pwd", cmdPwd)
    }
    
    func cmdPwd(...string) {
    	pwd, err := os.Getwd()
    	if err != nil {
    		fmt.Fprintln(os.Stderr, err)
    		os.Exit(1)
    	}
    	fmt.Println(pwd)
    }
    
    func TestCredentialNoSetGroups(t *testing.T) {
    	if runtime.GOOS == "android" {
    		maySkipHelperCommand("echo")
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 13 20:21:32 UTC 2022
    - 6.8K bytes
    - Viewed (0)
  10. src/time/zoneinfo_ios.go

    	// keep zoneinfo.zip for tethered iOS builds.
    	// For self-hosted iOS builds, the zoneinfo.zip is in GOROOT.
    	var roots []string
    	if goroot != "" {
    		roots = append(roots, goroot+"/lib/time")
    	}
    	wd, err := syscall.Getwd()
    	if err == nil {
    		roots = append(roots, wd)
    	}
    	for _, r := range roots {
    		var st syscall.Stat_t
    		fd, err := syscall.Open(r, syscall.O_RDONLY, 0)
    		if err != nil {
    			continue
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 18 20:57:35 UTC 2022
    - 1K bytes
    - Viewed (0)
Back to top