Documentation ¶
Overview ¶
Package preallocate allocates disk space efficiently via syscall (on supported platforms and filesystems) or by writing null bytes.
Files opened with O_APPEND are not supported.
Index ¶
Constants ¶
View Source
const NullBufferSize = 512 * 1024 // 512 KiB
NullBufferSize determines the maximum size of NULL byte blocks written to files when falling back to WriteSeeker.
Variables ¶
This section is empty.
Functions ¶
func WriteSeeker ¶
func WriteSeeker(w io.WriteSeeker, size int64) error
WriteSeeker preallocates an io.WriteSeeker by writing null bytes.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.