- Sort Score
- Num 10 results
- Language All
Results 1 - 10 of 59 for appendFile (0.17 seconds)
-
internal/ioutil/ioutil_test.go
defer os.Remove(name2) f.WriteString("bbbbbbbbbb") f.Close() if err = AppendFile(name1, name2, false); err != nil { t.Error(err) } b, err := os.ReadFile(name1) if err != nil { t.Error(err) } expected := "aaaaaaaaaabbbbbbbbbb" if string(b) != expected { t.Errorf("AppendFile() failed, expected: %s, got %s", expected, string(b)) } }
Created: Sun Apr 05 19:28:12 GMT 2026 - Last Modified: Tue Feb 18 16:25:55 GMT 2025 - 5.6K bytes - Click Count (0) -
cmd/xl-storage_unix_test.go
t.Fatalf("Creating a volume failed with %s expected to pass.", err) } // Attempt to create a file to verify the permissions later. // AppendFile creates file with 0666 perms. if err = disk.AppendFile(t.Context(), testCase.volName, pathJoin("hello-world.txt", xlStorageFormatFile), []byte("Hello World")); err != nil { t.Fatalf("Create a file `test` failed with %s expected to pass.", err) }
Created: Sun Apr 05 19:28:12 GMT 2026 - Last Modified: Wed Apr 09 14:28:39 GMT 2025 - 3.4K bytes - Click Count (0) -
cmd/storage-interface.go
ListDir(ctx context.Context, origvolume, volume, dirPath string, count int) ([]string, error) ReadFile(ctx context.Context, volume string, path string, offset int64, buf []byte, verifier *BitrotVerifier) (n int64, err error) AppendFile(ctx context.Context, volume string, path string, buf []byte) (err error) CreateFile(ctx context.Context, origvolume, olume, path string, size int64, reader io.Reader) error
Created: Sun Apr 05 19:28:12 GMT 2026 - Last Modified: Fri Apr 25 05:41:04 GMT 2025 - 5.3K bytes - Click Count (0) -
cmd/naughty-disk_test.go
return err } return d.disk.CreateFile(ctx, origvolume, volume, path, size, reader) } func (d *naughtyDisk) AppendFile(ctx context.Context, volume string, path string, buf []byte) error { if err := d.calcError(); err != nil { return err } return d.disk.AppendFile(ctx, volume, path, buf) }
Created: Sun Apr 05 19:28:12 GMT 2026 - Last Modified: Fri Apr 25 05:41:04 GMT 2025 - 10.1K bytes - Click Count (0) -
cmd/xl-storage_test.go
}, } // Create all files needed during testing. appendFiles := testCases[:4] v := NewBitrotVerifier(SHA256, getSHA256Sum([]byte("hello, world"))) // Create test files for further reading. for i, appendFile := range appendFiles { err = xlStorage.AppendFile(t.Context(), volume, appendFile.fileName, []byte("hello, world")) if err != appendFile.expectedErr {
Created: Sun Apr 05 19:28:12 GMT 2026 - Last Modified: Fri Aug 29 02:39:48 GMT 2025 - 66K bytes - Click Count (0) -
cmd/storage-rest-client.go
func (client *storageRESTClient) DeleteVol(ctx context.Context, volume string, forceDelete bool) (err error) { return errInvalidArgument } // AppendFile - append to a file. func (client *storageRESTClient) AppendFile(ctx context.Context, volume string, path string, buf []byte) error { values := make(url.Values) values.Set(storageRESTVolume, volume) values.Set(storageRESTFilePath, path)
Created: Sun Apr 05 19:28:12 GMT 2026 - Last Modified: Fri Aug 08 02:38:41 GMT 2025 - 30.4K bytes - Click Count (0) -
cmd/erasure-encode_test.go
"context" "crypto/rand" "io" "testing" "github.com/dustin/go-humanize" ) type badDisk struct{ StorageAPI } func (a badDisk) String() string { return "bad-disk" } func (a badDisk) AppendFile(ctx context.Context, volume string, path string, buf []byte) error { return errFaultyDisk } func (a badDisk) ReadFileStream(ctx context.Context, volume, path string, offset, length int64) (io.ReadCloser, error) {
Created: Sun Apr 05 19:28:12 GMT 2026 - Last Modified: Fri Aug 29 02:39:48 GMT 2025 - 11.8K bytes - Click Count (0) -
cmd/storage-rest_test.go
} } } func testStorageAPIRenameFile(t *testing.T, storage StorageAPI) { err := storage.AppendFile(t.Context(), "foo", "myobject", []byte("foo")) if err != nil { t.Fatalf("unexpected error %v", err) } err = storage.AppendFile(t.Context(), "foo", "otherobject", []byte("foo")) if err != nil { t.Fatalf("unexpected error %v", err) } testCases := []struct {
Created: Sun Apr 05 19:28:12 GMT 2026 - Last Modified: Wed Apr 09 14:28:39 GMT 2025 - 11.4K bytes - Click Count (0) -
cmd/xl-storage_windows_test.go
if err != nil { t.Fatal(err) } err = fs.AppendFile(context.Background(), "voldir", "/file", []byte("hello")) if err != nil { t.Fatal(err) } // Try to create a file that includes a file in its path components. // In *nix, this returns syscall.ENOTDIR while in windows we receive the following error. err = fs.AppendFile(context.Background(), "voldir", "/file/obj1", []byte("hello"))Created: Sun Apr 05 19:28:12 GMT 2026 - Last Modified: Wed Nov 29 06:35:16 GMT 2023 - 2.8K bytes - Click Count (0) -
cmd/xl-storage.go
if err != nil { return err } return s.writeAll(ctx, volume, path, b, true, volumeDir) } // AppendFile - append a byte array at path, if file doesn't exist at // path this call explicitly creates it. func (s *xlStorage) AppendFile(ctx context.Context, volume string, path string, buf []byte) (err error) { volumeDir, err := s.getVolDir(volume) if err != nil { return err }Created: Sun Apr 05 19:28:12 GMT 2026 - Last Modified: Sun Sep 28 20:59:21 GMT 2025 - 91.7K bytes - Click Count (0)