lib/file: make pre-allocate detect disk full errors and return them

This commit is contained in:
Nick Craig-Wood
2021-02-17 13:05:15 +00:00
parent 4fbb50422c
commit 40b58d59ad
3 changed files with 13 additions and 4 deletions

6
lib/file/preallocate.go Normal file
View File

@@ -0,0 +1,6 @@
package file
import "errors"
// ErrDiskFull is returned from PreAllocate when it detects disk full
var ErrDiskFull = errors.New("preallocate: file too big for remaining disk space")