mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-11-28 21:39:02 +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
|
|
}
|