You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
cloudreve/pkg/filemanager/driver/local/fallocate_linux.go

15 lines
208 B

package local
import (
"os"
"syscall"
)
func Fallocate(file *os.File, offset int64, length int64) error {
if length == 0 {
return nil
}
return syscall.Fallocate(int(file.Fd()), 0, offset, length)
}