Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for tmp_file1 (0.26 sec)

  1. tensorflow/compiler/mlir/quantization/stablehlo/cc/io_test.cc

      auto* const env = tsl::Env::Default();
      EXPECT_THAT(env->FileExists(*tmp_dir), IsOk());
    
      ASSERT_THAT(
          WriteStringToFile(absl::StrCat(*tmp_dir, "/tmp_file1"), "test_string"),
          IsOk());
      ASSERT_THAT(
          WriteStringToFile(absl::StrCat(*tmp_dir, "/tmp_file2"), "test_string"),
          IsOk());
      ASSERT_THAT(env->RecursivelyCreateDir(absl::StrCat(*tmp_dir, "/subdir")),
                  IsOk());
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Apr 24 03:28:15 UTC 2024
    - 6.7K bytes
    - Viewed (0)
  2. src/cmd/internal/obj/x86/pcrelative_test.go

    	if err != nil {
    		t.Fatal(err)
    	}
    	tmpfile, err := os.Create(filepath.Join(tmpdir, "input.s"))
    	if err != nil {
    		t.Fatal(err)
    	}
    	defer tmpfile.Close()
    	_, err = tmpfile.WriteString(source)
    	if err != nil {
    		t.Fatal(err)
    	}
    	tmpfile2, err := os.Create(filepath.Join(tmpdir, "input.go"))
    	if err != nil {
    		t.Fatal(err)
    	}
    	defer tmpfile2.Close()
    	_, err = tmpfile2.WriteString(goData)
    	if err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 15 23:16:01 UTC 2024
    - 2.3K bytes
    - Viewed (0)
  3. pkg/file/file.go

    				}
    			}
    		}
    	}()
    
    	if err := os.Chmod(tmpFile.Name(), mode); err != nil {
    		return err
    	}
    
    	if _, err := io.Copy(tmpFile, data); err != nil {
    		if closeErr := tmpFile.Close(); closeErr != nil {
    			err = fmt.Errorf("%s: %w", closeErr.Error(), err)
    		}
    		return err
    	}
    	if err := tmpFile.Close(); err != nil {
    		return err
    	}
    
    	return os.Rename(tmpFile.Name(), path)
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Apr 11 21:42:29 UTC 2024
    - 3K bytes
    - Viewed (0)
  4. testing/internal-integ-testing/src/main/groovy/org/gradle/test/fixtures/AbstractModule.groovy

            def tmpFile = file.parentFile.file("${file.name}.tmp")
    
            if (content) {
                tmpFile.bytes = content
            } else if (isJarFile(file)) {
                writeZipped(tmpFile, cl)
            } else {
                writeContents(tmpFile, cl)
                // normalize line endings
                tmpFile.setText(TextUtil.normaliseLineSeparators(tmpFile.getText("utf-8")), "utf-8")
            }
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Apr 04 07:21:38 UTC 2024
    - 5K bytes
    - Viewed (0)
  5. internal/disk/stat_test.go

    	}
    
    	for _, testCase := range testCases {
    		testCase := testCase
    		t.Run("", func(t *testing.T) {
    			tmpfile, err := os.CreateTemp("", "testfile")
    			if err != nil {
    				t.Error(err)
    			}
    			tmpfile.WriteString(testCase.stat)
    			tmpfile.Sync()
    			tmpfile.Close()
    
    			iostats, err := readDriveStats(tmpfile.Name())
    			if err != nil && !testCase.expectErr {
    				t.Fatalf("unexpected err; %v", err)
    			}
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Mon Feb 26 19:34:50 UTC 2024
    - 3.6K bytes
    - Viewed (0)
  6. src/cmd/internal/obj/loong64/asm_test.go

    	buf := bytes.NewBuffer(make([]byte, 0, genBufSize))
    	genLargeBranch(buf)
    
    	tmpfile := filepath.Join(dir, "x.s")
    	if err := os.WriteFile(tmpfile, buf.Bytes(), 0644); err != nil {
    		t.Fatalf("Failed to write file: %v", err)
    	}
    
    	// Assemble generated file.
    	cmd := testenv.Command(t, testenv.GoToolPath(t), "tool", "asm", "-o", filepath.Join(dir, "x.o"), tmpfile)
    	cmd.Env = append(os.Environ(), "GOARCH=loong64", "GOOS=linux")
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 15 17:39:37 UTC 2024
    - 2.2K bytes
    - Viewed (0)
  7. cmd/kubeadm/app/phases/certs/renewal/readwriter_test.go

    		err = os.RemoveAll(tmpdir)
    		if err != nil {
    			t.Fatalf("Fail to remove tmpdir: %v", err)
    		}
    	}()
    	tmpfile, err := os.CreateTemp(tmpdir, "")
    	if err != nil {
    		t.Fatalf("Couldn't create tmpfile: %v", err)
    	}
    	if err := tmpfile.Close(); err != nil {
    		t.Fatalf("Couldn't close tmpfile: %v", err)
    	}
    
    	tests := []struct {
    		name     string
    		filename string
    		want     bool
    	}{
    		{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu May 30 15:17:24 UTC 2024
    - 9.5K bytes
    - Viewed (0)
  8. subprojects/core/src/main/java/org/gradle/internal/classpath/DefaultClasspathBuilder.java

            File tmpFile = temporaryFileProvider.createTemporaryFile(jarFile.getName(), ".tmp");
            try {
                Files.createDirectories(parentDir.toPath());
                inPlaceBuilder.jar(tmpFile, action);
                Files.move(tmpFile.toPath(), jarFile.toPath(), StandardCopyOption.REPLACE_EXISTING);
            } finally {
                Files.deleteIfExists(tmpFile.toPath());
            }
        }
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Mar 12 02:21:10 UTC 2024
    - 3.8K bytes
    - Viewed (0)
  9. internal/ioutil/ioutil_test.go

    	f, err := os.CreateTemp("", "")
    	if err != nil {
    		t.Errorf("Error creating tmp file: %v", err)
    	}
    	tmpFile := f.Name()
    	f.Close()
    	defer os.Remove(f.Name())
    	fi1, err := os.Stat(tmpFile)
    	if err != nil {
    		t.Fatalf("Error Stat(): %v", err)
    	}
    	fi2, err := os.Stat(tmpFile)
    	if err != nil {
    		t.Fatalf("Error Stat(): %v", err)
    	}
    	if !SameFile(fi1, fi2) {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Wed May 22 23:07:14 UTC 2024
    - 5.5K bytes
    - Viewed (0)
  10. src/mime/multipart/formdata.go

    }
    
    // RemoveAll removes any temporary files associated with a [Form].
    func (f *Form) RemoveAll() error {
    	var err error
    	for _, fhs := range f.File {
    		for _, fh := range fhs {
    			if fh.tmpfile != "" {
    				e := os.Remove(fh.tmpfile)
    				if e != nil && !errors.Is(e, os.ErrNotExist) && err == nil {
    					err = e
    				}
    			}
    		}
    	}
    	return err
    }
    
    // A FileHeader describes a file part of a multipart request.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 21 16:12:35 UTC 2024
    - 7.7K bytes
    - Viewed (0)
Back to top