Documentation ¶ Rendered for linux/amd64 windows/amd64 darwin/amd64 js/wasm Index ¶ Constants func Deallocate(file *os.File, offset int64, length int64) error type FsStat func Statfs(path string) (FsStat, error) type SizeInfo func FileSize(path string) (SizeInfo, error) Constants ¶ View Source const FallocFlPunchHole = 0x02 // linux/falloc.h Variables ¶ This section is empty. Functions ¶ func Deallocate ¶ func Deallocate(file *os.File, offset int64, length int64) error Types ¶ type FsStat ¶ type FsStat struct { Capacity int64 Available int64 // Available to use for sector storage FSAvailable int64 // Available in the filesystem Reserved int64 // non-zero when storage has configured MaxStorage Max int64 Used int64 } func Statfs ¶ func Statfs(path string) (FsStat, error) type SizeInfo ¶ type SizeInfo struct { OnDisk int64 } func FileSize ¶ func FileSize(path string) (SizeInfo, error) FileSize returns bytes used by a file or directory on disk NOTE: We care about the allocated bytes, not file or directory size Source Files ¶ View all Source files dealloc_linux.go filesize_unix.go statfs.go statfs_unix.go Click to show internal directories. Click to hide internal directories.