github.com/cockroachdb/pebble@v1.1.2/vfs/errors_windows.go (about) 1 // Copyright 2020 The LevelDB-Go and Pebble Authors. All rights reserved. Use 2 // of this source code is governed by a BSD-style license that can be found in 3 // the LICENSE file. 4 5 //go:build windows 6 // +build windows 7 8 package vfs 9 10 import ( 11 "github.com/cockroachdb/errors" 12 "golang.org/x/sys/windows" 13 ) 14 15 var errNotEmpty = windows.ERROR_DIR_NOT_EMPTY 16 17 // IsNoSpaceError returns true if the given error indicates that the disk is 18 // out of space. 19 func IsNoSpaceError(err error) bool { 20 return errors.Is(err, windows.ERROR_DISK_FULL) || 21 errors.Is(err, windows.ERROR_HANDLE_DISK_FULL) 22 }