1package moxio
2
3import (
4 "errors"
5 "syscall"
6)
7
8// In separate file because of syscall import.
9
10// IsStorageSpace returns whether the error is for storage space issue.
11// Like disk full, no inodes, quota reached.
12func IsStorageSpace(err error) bool {
13 return errors.Is(err, syscall.ENOSPC) || errors.Is(err, syscall.EDQUOT)
14}
15