Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 137 for temp_file (0.26 sec)

  1. tensorflow/compiler/mlir/tensorflow/transforms/init_text_file_to_import_test_pass.cc

          llvm::sys::fs::createTemporaryFile("text", "vocab", fd, filename);
      if (error_code) return signalPassFailure();
    
      llvm::ToolOutputFile temp_file(filename, fd);
      temp_file.os() << "apple\n";
      temp_file.os() << "banana\n";
      temp_file.os() << "grape";
      temp_file.os().flush();
    
      // Replace filename constant ops to use the temporary file.
      MLIRContext* context = &getContext();
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Oct 04 09:19:38 UTC 2022
    - 5.5K bytes
    - Viewed (0)
  2. cluster/gce/gci/configure-helper.sh

        sed -i -e "s@{{ *run_as_group *}}@@g" "${temp_file}"
        sed -i -e "s@{{ *supplemental_groups *}}@@g" "${temp_file}"
        sed -i -e "s@{{ *container_security_context *}}@@g" "${temp_file}"
        sed -i -e "s@{{ *capabilities *}}@@g" "${temp_file}"
        sed -i -e "s@{{ *drop_capabilities *}}@@g" "${temp_file}"
        sed -i -e "s@{{ *disallow_privilege_escalation *}}@@g" "${temp_file}"
      fi
      mv "${temp_file}" /etc/kubernetes/manifests
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Jun 10 22:07:47 UTC 2024
    - 141.1K bytes
    - Viewed (0)
  3. internal/config/certs_test.go

    func createTempFile(prefix, content string) (tempFile string, err error) {
    	var tmpfile *os.File
    
    	if tmpfile, err = os.CreateTemp("", prefix); err != nil {
    		return tempFile, err
    	}
    
    	if _, err = tmpfile.Write([]byte(content)); err != nil {
    		return tempFile, err
    	}
    
    	if err = tmpfile.Close(); err != nil {
    		return tempFile, err
    	}
    
    	tempFile = tmpfile.Name()
    	return tempFile, err
    }
    
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Mon Sep 19 18:05:16 UTC 2022
    - 21.6K bytes
    - Viewed (0)
  4. src/io/ioutil/tempfile.go

    package ioutil
    
    import (
    	"os"
    )
    
    // TempFile creates a new temporary file in the directory dir,
    // opens the file for reading and writing, and returns the resulting *[os.File].
    // The filename is generated by taking pattern and adding a random
    // string to the end. If pattern includes a "*", the random string
    // replaces the last "*".
    // If dir is the empty string, TempFile uses the default directory
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Oct 18 19:34:35 UTC 2023
    - 1.7K bytes
    - Viewed (0)
  5. platforms/core-runtime/file-temp/src/main/java/org/gradle/api/internal/file/temp/TempFiles.java

    import javax.annotation.CheckReturnValue;
    import java.io.File;
    import java.io.IOException;
    
    /**
     * Security safe API's for creating temporary files.
     */
    public final class TempFiles {
    
        private TempFiles() {
            /* no-op */
        }
    
        /**
         * Improves the security guarantees of {@link File#createTempFile(String, String, File)}.
         *
         * @see File#createTempFile(String, String, File)
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Sep 22 08:50:17 UTC 2023
    - 1.6K bytes
    - Viewed (0)
  6. src/os/tempfile.go

    	_ "unsafe" // for go:linkname
    )
    
    // random number source provided by runtime.
    // We generate random temporary file names so that there's a good
    // chance the file doesn't exist yet - keeps the number of tries in
    // TempFile to a minimum.
    //
    //go:linkname runtime_rand runtime.rand
    func runtime_rand() uint64
    
    func nextRandom() string {
    	return itoa.Uitoa(uint(uint32(runtime_rand())))
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 12 18:04:39 UTC 2024
    - 3.9K bytes
    - Viewed (0)
  7. 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)
  8. src/io/ioutil/tempfile_test.go

    		{sep + "ioutil_test" + sep + "*foo", true},
    		{"ioutil_test*foo" + sep, true},
    	}
    	for _, tt := range tests {
    		t.Run(tt.pattern, func(t *testing.T) {
    			tmpfile, err := TempFile(tmpDir, tt.pattern)
    			defer func() {
    				if tmpfile != nil {
    					tmpfile.Close()
    				}
    			}()
    			if tt.wantErr {
    				if err == nil {
    					t.Errorf("Expected an error for pattern %q", tt.pattern)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 18 00:47:29 UTC 2022
    - 5.5K bytes
    - Viewed (0)
  9. cmd/kubeadm/app/util/runtime/runtime_test.go

    	}{
    		{
    			name: "Valid domain socket is detected as such",
    			proc: func(t *testing.T) {
    				tmpFile, err := os.CreateTemp("", tempPrefix)
    				if err != nil {
    					t.Fatalf("unexpected error by TempFile: %v", err)
    				}
    				theSocket := tmpFile.Name()
    				os.Remove(theSocket)
    				tmpFile.Close()
    
    				con, err := net.Listen("unix", theSocket)
    				if err != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu May 30 06:33:22 UTC 2024
    - 11.1K bytes
    - Viewed (0)
  10. pkg/kubelet/util/store/filestore.go

    	// Create a temporary file in the base directory of `path` with a prefix.
    	tmpFile, err := fs.TempFile(filepath.Dir(path), tmpPrefix)
    	if err != nil {
    		return err
    	}
    
    	tmpPath := tmpFile.Name()
    	shouldClose := true
    
    	defer func() {
    		// Close the file.
    		if shouldClose {
    			if err := tmpFile.Close(); err != nil {
    				if retErr == nil {
    					retErr = fmt.Errorf("close error: %v", err)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Jul 18 15:08:27 UTC 2022
    - 3.9K bytes
    - Viewed (0)
Back to top