mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00: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
|
|
}
|