Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 177 for chdir (0.2 sec)

  1. src/cmd/vendor/golang.org/x/sys/plan9/pwd_plan9.go

    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)
  2. src/syscall/pwd_plan9.go

    		return
    	}
    	wdSet = true
    	wdStr = wd
    	return wd, nil
    }
    
    func Chdir(path string) error {
    	// If Chdir is to a relative path, sync working dir first
    	if fixwd(path) {
    		defer runtime.UnlockOSThread()
    	}
    	wdmu.Lock()
    	defer wdmu.Unlock()
    
    	runtime.LockOSThread()
    	defer runtime.UnlockOSThread()
    	if err := chdir(path); err != nil {
    		return err
    	}
    
    	wd, err := getwd()
    	if err != nil {
    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. tests/test_tutorial/test_sql_databases/test_testing_databases.py

    
    # TODO: pv2 add version with Pydantic v2
    @needs_pydanticv1
    def test_testing_dbs(tmp_path_factory: pytest.TempPathFactory):
        tmp_path = tmp_path_factory.mktemp("data")
        cwd = os.getcwd()
        os.chdir(tmp_path)
        test_db = Path("./test.db")
        if test_db.is_file():  # pragma: nocover
            test_db.unlink()
        # Import while creating the client to create the DB after starting the test session
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Fri Jul 07 17:12:13 UTC 2023
    - 788 bytes
    - Viewed (0)
  4. src/os/exec/lp_unix_test.go

    //go:build unix
    
    package exec_test
    
    import (
    	"os"
    	"os/exec"
    	"testing"
    )
    
    func TestLookPathUnixEmptyPath(t *testing.T) {
    	// Not parallel: uses Chdir and Setenv.
    
    	tmp := t.TempDir()
    	chdir(t, tmp)
    
    	f, err := os.OpenFile("exec_me", os.O_CREATE|os.O_EXCL, 0700)
    	if err != nil {
    		t.Fatal("OpenFile failed: ", err)
    	}
    	err = f.Close()
    	if err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Sep 13 18:19:21 UTC 2023
    - 762 bytes
    - Viewed (0)
  5. tests/test_tutorial/test_sql_databases/test_testing_databases_py39.py

    @needs_py39
    # TODO: pv2 add version with Pydantic v2
    @needs_pydanticv1
    def test_testing_dbs_py39(tmp_path_factory: pytest.TempPathFactory):
        tmp_path = tmp_path_factory.mktemp("data")
        cwd = os.getcwd()
        os.chdir(tmp_path)
        test_db = Path("./test.db")
        if test_db.is_file():  # pragma: nocover
            test_db.unlink()
        # Import while creating the client to create the DB after starting the test session
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Fri Jul 07 17:12:13 UTC 2023
    - 822 bytes
    - Viewed (0)
  6. tests/test_tutorial/test_sql_databases/test_testing_databases_py310.py

    @needs_py310
    # TODO: pv2 add version with Pydantic v2
    @needs_pydanticv1
    def test_testing_dbs_py39(tmp_path_factory: pytest.TempPathFactory):
        tmp_path = tmp_path_factory.mktemp("data")
        cwd = os.getcwd()
        os.chdir(tmp_path)
        test_db = Path("./test.db")
        if test_db.is_file():  # pragma: nocover
            test_db.unlink()
        # Import while creating the client to create the DB after starting the test session
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Fri Jul 07 17:12:13 UTC 2023
    - 825 bytes
    - Viewed (0)
  7. src/runtime/cgo/gcc_darwin_arm64.c

    		fprintf(stderr, "runtime/cgo: bad URL: %s\n", buf);
    		return;
    	}
    	buf[url_len-sizeof("/Info.plist")+1] = 0;
    	char *dir = &buf[0] + sizeof("file://")-1;
    
    	if (chdir(dir) != 0) {
    		fprintf(stderr, "runtime/cgo: chdir(%s) failed\n", dir);
    	}
    
    	// The test harness in go_ios_exec passes the relative working directory
    	// in the GoExecWrapperWorkingDirectory property of the app bundle.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Aug 09 03:13:11 UTC 2023
    - 3.6K bytes
    - Viewed (0)
  8. src/cmd/vendor/golang.org/x/sys/plan9/pwd_go15_plan9.go

    //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)
  9. src/cmd/go/testdata/script/test_cache_inputs.txt

    stdout '\(cached\)'
    
    # Files should be tracked even if the test changes its working directory.
    go test testcache -run=Chdir
    go test testcache -run=Chdir
    stdout '\(cached\)'
    cp 6x.txt testcache/file.txt
    go test testcache -run=Chdir
    ! stdout '\(cached\)'
    go test testcache -run=Chdir
    stdout '\(cached\)'
    
    # The content of files should affect caching, provided that the mtime also changes.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat Mar 09 22:23:53 UTC 2024
    - 6.3K bytes
    - Viewed (0)
  10. src/runtime/testdata/testprog/lockosthread.go

    				println("unshare not permitted")
    				os.Exit(0)
    			}
    			println("failed to unshare fs:", err.Error())
    			os.Exit(1)
    		}
    		// Chdir to somewhere else on this thread.
    		// On systems other than Linux, this is a no-op.
    		if err := chdir(os.TempDir()); err != nil {
    			println("failed to chdir:", err.Error())
    			os.Exit(1)
    		}
    
    		// The state on this thread is now considered "tainted", but it
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 21 20:00:09 UTC 2024
    - 6.6K bytes
    - Viewed (0)
Back to top