Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 28 of 28 for WriteFile (0.07 sec)

  1. cni/test/install_cni.go

    		return e.Name()
    	})
    }
    
    func cp(src, dest string, t *testing.T) {
    	t.Helper()
    	data, err := os.ReadFile(src)
    	if err != nil {
    		t.Fatalf("Failed to read file %v, err: %v", src, err)
    	}
    	if err = os.WriteFile(dest, data, os.FileMode(defaultFileMode)); err != nil {
    		t.Fatalf("Failed to write file %v, err: %v", dest, err)
    	}
    }
    
    func rmDir(dir string, t *testing.T) {
    	t.Helper()
    	err := os.RemoveAll(dir)
    Registered: Wed Nov 06 22:53:10 UTC 2024
    - Last Modified: Thu Aug 01 18:38:14 UTC 2024
    - 11.3K bytes
    - Viewed (0)
  2. src/archive/zip/reader_test.go

    //		if err := os.WriteFile("/tmp/big.zip", bigZip, 0666); err != nil {
    //			log.Fatal(err)
    //		}
    //
    //		biggerZip := makeZip("big.zip", bytes.NewReader(bigZip))
    //		if err := os.WriteFile("/tmp/bigger.zip", biggerZip, 0666); err != nil {
    //			log.Fatal(err)
    //		}
    //
    //		biggestZip := makeZip("bigger.zip", bytes.NewReader(biggerZip))
    //		if err := os.WriteFile("/tmp/biggest.zip", biggestZip, 0666); err != nil {
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Thu Jul 25 00:25:45 UTC 2024
    - 55.6K bytes
    - Viewed (0)
  3. istioctl/pkg/validate/validate_test.go

    	t.Helper()
    	tempDir, err := os.MkdirTemp("", "TestValidateCommand")
    	if err != nil {
    		t.Fatal(err)
    	}
    
    	for name, content := range files {
    		filePath := filepath.Join(tempDir, name)
    		if err := os.WriteFile(filePath, []byte(content), 0o644); err != nil {
    			t.Fatal(err)
    		}
    	}
    
    	return tempDir
    }
    
    func TestValidateCommand(t *testing.T) {
    Registered: Wed Nov 06 22:53:10 UTC 2024
    - Last Modified: Fri Aug 02 16:18:14 UTC 2024
    - 21.4K bytes
    - Viewed (0)
  4. api/go1.19.txt

    pkg io/ioutil, func ReadDir //deprecated #42026
    pkg io/ioutil, func ReadFile //deprecated #42026
    pkg io/ioutil, func TempDir //deprecated #42026
    pkg io/ioutil, func TempFile //deprecated #42026
    pkg io/ioutil, func WriteFile //deprecated #42026
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Fri Dec 02 16:29:41 UTC 2022
    - 17.9K bytes
    - Viewed (0)
  5. cmd/erasure-healing_test.go

    	uuid, _ := uuid2.NewRandom()
    	for _, drive := range fsDirs {
    		dir := path.Join(drive, bucket, object, uuid.String())
    		err = os.MkdirAll(dir, os.ModePerm)
    		if err != nil {
    			t.Fatal(err)
    		}
    		err = os.WriteFile(pathJoin(dir, "part.1"), []byte("some data"), os.ModePerm)
    		if err != nil {
    			t.Fatal(err)
    		}
    	}
    
    	// This should remove all the unreferenced parts.
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Jun 10 15:51:27 UTC 2024
    - 49K bytes
    - Viewed (0)
  6. cmd/format-erasure.go

    	if err != nil {
    		return nil, nil, fmt.Errorf("Drive %s: %w", export, err)
    	}
    
    	migrate := func(formatPath string, formatData []byte) ([]byte, fs.FileInfo, error) {
    		if err = os.WriteFile(formatPath, formatData, 0o666); err != nil {
    			return nil, nil, err
    		}
    		formatFi, err := Lstat(formatPath)
    		if err != nil {
    			return nil, nil, err
    		}
    		return formatData, formatFi, nil
    	}
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 23.2K bytes
    - Viewed (0)
  7. api/go1.16.txt

    pkg os, func ReadDir(string) ([]fs.DirEntry, error)
    pkg os, func ReadFile(string) ([]uint8, error)
    pkg os, func SameFile(fs.FileInfo, fs.FileInfo) bool
    pkg os, func Stat(string) (fs.FileInfo, error)
    pkg os, func WriteFile(string, []uint8, fs.FileMode) error
    pkg os, method (*File) Chmod(fs.FileMode) error
    pkg os, method (*File) ReadDir(int) ([]fs.DirEntry, error)
    pkg os, method (*File) Readdir(int) ([]fs.FileInfo, error)
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Fri Dec 02 16:30:41 UTC 2022
    - 479.2K bytes
    - Viewed (0)
  8. api/go1.txt

    pkg io/ioutil, func ReadFile(string) ([]uint8, error)
    pkg io/ioutil, func TempDir(string, string) (string, error)
    pkg io/ioutil, func TempFile(string, string) (*os.File, error)
    pkg io/ioutil, func WriteFile(string, []uint8, os.FileMode) error
    pkg io/ioutil, var Discard io.Writer
    pkg log, const Ldate ideal-int
    pkg log, const Llongfile ideal-int
    pkg log, const Lmicroseconds ideal-int
    pkg log, const Lshortfile ideal-int
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Wed Aug 14 18:58:28 UTC 2013
    - 1.7M bytes
    - Viewed (0)
Back to top