zeroshade commented on code in PR #262: URL: https://github.com/apache/iceberg-go/pull/262#discussion_r1924079606
########## io/blob.go: ########## @@ -106,6 +106,10 @@ func (bfs *blobFileIO) Remove(name string) error { return bfs.Bucket.Delete(context.Background(), name) } +func (bfs *blobFileIO) Create(name string) (FileWriter, error) { + return bfs.NewWriter(name, true, nil) +} + Review Comment: no. There's a difference: `WriteFile` is on the IO object directly, based on https://pkg.go.dev/os#WriteFile which creates a file and writes the provided content to it directly. It's essentially the equivalent of ```go f, err := os.Create(name) if err != nil { return err } if _, err = f.Write(contents); err != nil { return err } return f.Close() ``` Whereas this `Write` method is for incremental writes to a file, implementing the [`io.Writer`](https://pkg.go.dev/io#Writer) interface. Notice that this method is a function on the `file` object, not the `IO` object. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org