Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 397 for getPwd (0.64 sec)

  1. platforms/core-configuration/configuration-cache/src/integTest/groovy/org/gradle/internal/cc/impl/inputs/process/instrument/AbstractProcessInstrumentationIntegrationTest.groovy

        ShellScript baseScript = ShellScript.builder().printEnvironmentVariable('FOOBAR').printWorkingDir().writeTo(testDirectory, "test")
    
        def setup() {
            testDirectory.createDir(pwd)
        }
    
    
        static String getPwd() {
            return "tmp"
        }
    
        abstract static class VarInitializer {
            final String description
    
            VarInitializer(String description) {
                this.description = description
            }
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Sat Jun 08 11:29:25 UTC 2024
    - 7.8K bytes
    - Viewed (0)
  2. 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)
  3. src/syscall/syscall_js.go

    	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()
    }
    
    func Getgid() int {
    	return jsProcess.Call("getgid").Int()
    }
    
    func Geteuid() 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)
  4. 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)
  5. src/cmd/vendor/golang.org/x/sys/unix/syscall_aix.go

    	if err = getsockname(fd, &rsa, &len); err != nil {
    		return
    	}
    	return anyToSockaddr(fd, &rsa)
    }
    
    //sys	getcwd(buf []byte) (err error)
    
    const ImplementsGetwd = true
    
    func Getwd() (ret string, err error) {
    	for len := uint64(4096); ; len *= 2 {
    		b := make([]byte, len)
    		err := getcwd(b)
    		if err == nil {
    			i := 0
    			for b[i] != 0 {
    				i++
    			}
    			return string(b[0:i]), nil
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Nov 29 21:28:33 UTC 2023
    - 16.1K bytes
    - Viewed (0)
  6. src/syscall/syscall_solaris.go

    		return
    	}
    	return anyToSockaddr(&rsa)
    }
    
    const ImplementsGetwd = true
    
    //sys	Getcwd(buf []byte) (n int, err error)
    
    func Getwd() (wd string, err error) {
    	var buf [PathMax]byte
    	// Getcwd will return an error if it failed for any reason.
    	_, err = Getcwd(buf[0:])
    	if err != nil {
    		return "", err
    	}
    	n := clen(buf[:])
    	if n < 1 {
    		return "", EINVAL
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 26 21:03:59 UTC 2024
    - 15.7K bytes
    - Viewed (0)
  7. src/syscall/syscall_aix.go

    func Unlinkat(dirfd int, path string) (err error) {
    	return unlinkat(dirfd, path, 0)
    }
    
    //sys	getcwd(buf *byte, size uint64) (err error)
    
    const ImplementsGetwd = true
    
    func Getwd() (ret string, err error) {
    	for len := uint64(4096); ; len *= 2 {
    		b := make([]byte, len)
    		err := getcwd(&b[0], len)
    		if err == nil {
    			i := 0
    			for b[i] != 0 {
    				i++
    			}
    			return string(b[0:i]), nil
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 13:50:55 UTC 2024
    - 17.9K bytes
    - Viewed (0)
  8. src/syscall/creds_test.go

    			}
    			switch err {
    			case syscall.EPERM, syscall.EINVAL:
    			default:
    				t.Fatalf("WriteMsgUnix failed with %v, want EPERM or EINVAL", err)
    			}
    		}
    
    		ucred.Pid = int32(os.Getpid())
    		ucred.Uid = uint32(os.Getuid())
    		ucred.Gid = uint32(os.Getgid())
    		oob := syscall.UnixCredentials(&ucred)
    
    		// On SOCK_STREAM, this is internally going to send a dummy byte
    		n, oobn, err := cli.(*net.UnixConn).WriteMsgUnix(nil, oob, nil)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 17 02:43:05 UTC 2022
    - 3.4K bytes
    - Viewed (0)
  9. 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)
  10. pkg/ctrlz/topics/proc.go

    	Goroutines int    `json:"goroutines"`
    }
    
    func getProcInfo() *procInfo {
    	pi := procInfo{
    		Egid:       os.Getegid(),
    		Euid:       os.Geteuid(),
    		GID:        os.Getgid(),
    		Pid:        os.Getpid(),
    		Ppid:       os.Getppid(),
    		UID:        os.Getuid(),
    		TempDir:    os.TempDir(),
    		Goroutines: runtime.NumGoroutine(),
    	}
    
    	pi.Groups, _ = os.Getgroups()
    	pi.Wd, _ = os.Hostname()
    	pi.Hostname, _ = os.Hostname()
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed May 24 14:06:41 UTC 2023
    - 2.3K bytes
    - Viewed (0)
Back to top