- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 12 for AppendFile (0.17 sec)
-
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)) } }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed May 22 23:07:14 UTC 2024 - 5.5K bytes - Viewed (0) -
cmd/storage-rest_test.go
} } } func testStorageAPIRenameFile(t *testing.T, storage StorageAPI) { err := storage.AppendFile(context.Background(), "foo", "myobject", []byte("foo")) if err != nil { t.Fatalf("unexpected error %v", err) } err = storage.AppendFile(context.Background(), "foo", "otherobject", []byte("foo")) if err != nil { t.Fatalf("unexpected error %v", err) }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Jul 22 07:04:48 UTC 2024 - 11.5K bytes - Viewed (0) -
cmd/xl-storage_test.go
// Create test files for further reading. for i, appendFile := range appendFiles { err = xlStorage.AppendFile(context.Background(), volume, appendFile.fileName, []byte("hello, world")) if err != appendFile.expectedErr { t.Fatalf("Creating file failed: %d %#v, expected: %s, got: %s", i+1, appendFile, appendFile.expectedErr, err) } } { buf := make([]byte, 5)
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed Aug 14 17:11:51 UTC 2024 - 66.7K bytes - Viewed (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"))
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed Nov 29 06:35:16 UTC 2023 - 2.8K bytes - Viewed (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) }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Aug 12 08:38:15 UTC 2024 - 10.1K bytes - Viewed (0) -
cmd/bitrot-whole.go
volume string filePath string shardSize int64 // This is the shard size of the erasure logic hash.Hash // For bitrot hash } func (b *wholeBitrotWriter) Write(p []byte) (int, error) { err := b.disk.AppendFile(context.TODO(), b.volume, b.filePath, p) if err != nil { return 0, err } _, err = b.Hash.Write(p) if err != nil { return 0, err } return len(p), nil }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed Jan 31 02:11:45 UTC 2024 - 2.7K bytes - Viewed (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
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Aug 12 08:38:15 UTC 2024 - 5.2K bytes - Viewed (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)
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sun Oct 13 13:07:21 UTC 2024 - 30.2K bytes - Viewed (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) {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Jan 30 20:43:25 UTC 2024 - 11.9K bytes - Viewed (0) -
cmd/xl-storage-disk-id-check.go
return p.storage.ReadFile(ctx, volume, path, offset, buf, verifier) }) } // Legacy API - does not have any deadlines func (p *xlStorageDiskIDCheck) AppendFile(ctx context.Context, volume string, path string, buf []byte) (err error) { ctx, done, err := p.TrackDiskHealth(ctx, storageMetricAppendFile, volume, path) if err != nil { return err }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sat Oct 26 09:56:26 UTC 2024 - 34.5K bytes - Viewed (0)