From 103487e8ad6248dae5408a28e45906fe4a685cb0 Mon Sep 17 00:00:00 2001
From: Max Kellermann <max.kellermann@ionos.com>
Date: Fri, 7 Mar 2025 15:12:45 +0100
Subject: [PATCH] event/InotifyEvent: add method IsDefined()

---
 src/event/InotifyEvent.hxx | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/event/InotifyEvent.hxx b/src/event/InotifyEvent.hxx
index ee1354957..79eeae52b 100644
--- a/src/event/InotifyEvent.hxx
+++ b/src/event/InotifyEvent.hxx
@@ -51,6 +51,13 @@ public:
 		return event.GetEventLoop();
 	}
 
+	/**
+	 * Is the inotify file descriptor still open?
+	 */
+	bool IsDefined() const noexcept {
+		return event.IsDefined();
+	}
+
 	/**
 	 * Re-enable polling the inotify file descriptor after it was
 	 * disabled by Disable().