Implement unwatching a path
This commit is contained in:
@@ -3,6 +3,7 @@ import CInotify
|
||||
public enum InotifyError: Error, Sendable, CustomStringConvertible {
|
||||
case initFailed(errno: Int32)
|
||||
case addWatchFailed(path: String, errno: Int32)
|
||||
case removeWatchFailed(watchDescriptor: Int32, errno: Int32)
|
||||
|
||||
public var description: String {
|
||||
switch self {
|
||||
@@ -10,6 +11,8 @@ public enum InotifyError: Error, Sendable, CustomStringConvertible {
|
||||
"inotify_init1 failed: \(readableErrno(code))"
|
||||
case .addWatchFailed(let path, let code):
|
||||
"inotify_add_watch failed for '\(path)': \(readableErrno(code))"
|
||||
case .removeWatchFailed(let wd, let code):
|
||||
"inotify_rm_watch failed for wd \(wd): \(readableErrno(code))"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user