mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-12-19 05:27:50 +08: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
|
|
}
|