summaryrefslogtreecommitdiff
path: root/vendor/github.com/Microsoft/go-winio/file.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/Microsoft/go-winio/file.go')
-rw-r--r--vendor/github.com/Microsoft/go-winio/file.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/vendor/github.com/Microsoft/go-winio/file.go b/vendor/github.com/Microsoft/go-winio/file.go
index 0385e4108..293ab54c8 100644
--- a/vendor/github.com/Microsoft/go-winio/file.go
+++ b/vendor/github.com/Microsoft/go-winio/file.go
@@ -1,3 +1,4 @@
+//go:build windows
// +build windows
package winio
@@ -143,6 +144,11 @@ func (f *win32File) Close() error {
return nil
}
+// IsClosed checks if the file has been closed
+func (f *win32File) IsClosed() bool {
+ return f.closing.isSet()
+}
+
// prepareIo prepares for a new IO operation.
// The caller must call f.wg.Done() when the IO is finished, prior to Close() returning.
func (f *win32File) prepareIo() (*ioOperation, error) {