Skip to content

Commit e471025

Browse files
committed
Add Close()
1 parent 54a8586 commit e471025

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pkg/directfile/directfile.go

+5
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ func openNodirect(path string) (*DirectFile, error) {
2727
return &DirectFile{file: file, Direct: false}, nil
2828
}
2929

30+
// Close closes the file
31+
func (df *DirectFile) Close() error {
32+
return df.file.Close()
33+
}
34+
3035
// Read satisfies the io.Reader
3136
func (df *DirectFile) Read(p []byte) (n int, err error) {
3237
blockSize := int(df.blockSize)

0 commit comments

Comments
 (0)