mirror of
https://github.com/chrislusf/seaweedfs
synced 2024-09-06 00:50:37 +02:00
12 lines
232 B
Go
12 lines
232 B
Go
package storage
|
|
|
|
import (
|
|
"os"
|
|
)
|
|
|
|
func getBytesForFileBlock(r *os.File, offset int64, readSize int) (dataSlice []byte, err error) {
|
|
dataSlice = make([]byte, readSize)
|
|
_, err = r.ReadAt(dataSlice, offset)
|
|
return dataSlice, err
|
|
}
|