Files
cloudreve/pkg/filemanager/driver/local/fallocate_linux.go
AaronLiu 21d158db07 Init V4 community edition (#2265)
* Init V4 community edition

* Init V4 community edition
2025-04-20 17:31:25 +08:00

15 lines
208 B
Go

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)
}