Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 44 for sameFile (0.17 sec)

  1. internal/ioutil/ioutil_test.go

    	if err != nil {
    		t.Fatalf("Error Stat(): %v", err)
    	}
    	if !SameFile(fi1, fi2) {
    		t.Fatal("Expected the files to be same")
    	}
    	if err = os.WriteFile(tmpFile, []byte("aaa"), 0o644); err != nil {
    		t.Fatal(err)
    	}
    	fi2, err = os.Stat(tmpFile)
    	if err != nil {
    		t.Fatalf("Error Stat(): %v", err)
    	}
    	if SameFile(fi1, fi2) {
    		t.Fatal("Expected the files not to be same")
    	}
    }
    
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Wed May 22 23:07:14 UTC 2024
    - 5.5K bytes
    - Viewed (0)
  2. src/internal/testenv/testenv_test.go

    	if err != nil {
    		t.Fatalf("testenv.GoTool(): %v", err)
    	}
    	t.Logf("testenv.GoTool() = %q", goTool)
    
    	gotInfo, err := os.Stat(goTool)
    	if err != nil {
    		t.Fatal(err)
    	}
    	if !os.SameFile(wantInfo, gotInfo) {
    		t.Fatalf("%q is not the same file as %q", absWant, goTool)
    	}
    }
    
    func TestHasGoBuild(t *testing.T) {
    	if !testenv.HasGoBuild() {
    		switch runtime.GOOS {
    		case "js", "wasip1":
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jan 25 23:12:44 UTC 2024
    - 6.1K bytes
    - Viewed (0)
  3. src/os/exec/lp_windows.go

    				// out that the explicit one doesn't match.
    				dotfi, dotfiErr := os.Lstat(dotf)
    				fi, fiErr := os.Lstat(f)
    				if dotfiErr != nil || fiErr != nil || !os.SameFile(dotfi, fi) {
    					return dotf, dotErr
    				}
    			}
    
    			if !filepath.IsAbs(f) {
    				if execerrdot.Value() != "0" {
    					// If this is the same relative path that we already found,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 26 21:33:12 UTC 2024
    - 6K bytes
    - Viewed (0)
  4. src/os/example_test.go

    	// on the original target path.
    	dstInfo, err := os.Stat(dstAbs)
    	if err != nil {
    		log.Fatal(err)
    	}
    	targetInfo, err := os.Stat(targetPath)
    	if err != nil {
    		log.Fatal(err)
    	}
    	if !os.SameFile(dstInfo, targetInfo) {
    		log.Fatalf("link destination (%s) is not the same file as %s", dstAbs, targetPath)
    	}
    
    	// Output:
    	// hello.link links to hello.txt
    }
    
    func ExampleUserCacheDir() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jan 10 17:35:49 UTC 2024
    - 8.4K bytes
    - Viewed (0)
  5. platforms/jvm/language-java/src/test/groovy/org/gradle/api/internal/tasks/compile/DiagnosticToProblemListenerTest.groovy

                name >> "SomeFile.java"
            }
            diagnostic.lineNumber >> 1
            diagnostic.columnNumber | diagnostic.startPosition | diagnostic.endPosition >> Diagnostic.NOPOS
    
            when:
            diagnosticToProblemListener.buildProblem(diagnostic, spec)
    
            then:
            1 * spec.fileLocation("SomeFile.java")
            1 * spec.lineInFileLocation("SomeFile.java", 1)
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu May 30 13:58:13 UTC 2024
    - 6.2K bytes
    - Viewed (0)
  6. platforms/software/testing-base/src/test/groovy/org/gradle/api/internal/tasks/testing/logging/ClassMethodNameStackTraceSpecTest.groovy

    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon Sep 18 20:52:40 UTC 2023
    - 2.6K bytes
    - Viewed (0)
  7. src/cmd/go/testdata/script/test_race_install_cgo.txt

    	if err != nil {
    		fmt.Fprintln(os.Stderr, err)
    		os.Exit(1)
    	}
    	if err := json.NewEncoder(os.Stdout).Encode(info.ModTime()); err != nil {
    		fmt.Fprintln(os.Stderr, err)
    		os.Exit(1)
    	}
    }
    -- sametime/sametime.go --
    package main
    
    import (
    	"encoding/json"
    	"fmt"
    	"os"
    	"time"
    )
    
    
    func main() {
    	var t1 time.Time
    	b1, err := os.ReadFile(os.Args[1])
    	if err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 27 14:03:15 UTC 2021
    - 1.8K bytes
    - Viewed (0)
  8. subprojects/core/src/test/groovy/org/gradle/process/internal/DefaultExecActionFactoryTest.groovy

                .withInstantiator(instantiator.decorateLenient())
                .withObjectFactory(TestUtil.objectFactory())
                .build()
    
        def javaexec() {
            File testFile = tmpDir.file("someFile")
            List files = ClasspathUtil.getClasspath(getClass().classLoader).asFiles
    
            when:
            ExecResult result = factory.javaexec { spec ->
                spec.classpath(files as Object[])
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Jun 15 17:11:21 UTC 2023
    - 4.1K bytes
    - Viewed (0)
  9. platforms/core-execution/persistent-cache/src/test/groovy/org/gradle/cache/internal/AbstractCacheCleanupTest.groovy

            cacheEntries[2].assertExists()
            deletedFiles == [cacheEntries[1]]
        }
    
        def "can delete directories"() {
            given:
            def cacheEntry = cacheDir.file("subDir").createFile("somefile")
            cacheEntry.text = "delete me"
    
            when:
            cleanupAction(finder([cacheEntry.parentFile]), { true })
                .clean(cleanableStore, progressMonitor)
    
            then:
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Sep 22 09:08:47 UTC 2023
    - 4.4K bytes
    - Viewed (0)
  10. maven-model-builder/src/test/java/org/apache/maven/model/profile/activation/FileProfileActivatorTest.java

            assertActivation(false, newExistsProfile("someFile.txt"), context);
            assertActivation(false, newExistsProfile("${basedir}/someFile.txt"), context);
    
            assertActivation(false, newMissingProfile(null), context);
            assertActivation(true, newMissingProfile("someFile.txt"), context);
            assertActivation(true, newMissingProfile("${basedir}/someFile.txt"), context);
        }
    
        @Test
    Registered: Wed Jun 12 09:55:16 UTC 2024
    - Last Modified: Wed Sep 06 08:39:32 UTC 2023
    - 5.2K bytes
    - Viewed (0)
Back to top