From c95d8758347f4881446090bef3a5498909ecbfc0 Mon Sep 17 00:00:00 2001 From: Maximilian Hafer Date: Tue, 12 Mar 2024 20:49:36 +0100 Subject: [PATCH] docs: add warning for monitoring pseudo filesystems --- src/content/docs/config/custom-service.md | 9 +++++++++ src/content/docs/config/utils.md | 8 ++++++++ 2 files changed, 17 insertions(+) diff --git a/src/content/docs/config/custom-service.md b/src/content/docs/config/custom-service.md index 9296647..a41b935 100644 --- a/src/content/docs/config/custom-service.md +++ b/src/content/docs/config/custom-service.md @@ -100,6 +100,15 @@ const service = new BrightnessService; export default service; ``` +:::caution +`Utils.monitorFile` only reports events that a user-space program +triggers through the filesystem API. As a result, it does not catch +remote events that occur on network filesystems. +Furthermore, most pseudo-filesystems such as `/proc`, `/sys` and `/dev/pts` +cannot be monitored. +::: + + :::note For `bind` to work, the property has to be defined in `Service.register` ::: diff --git a/src/content/docs/config/utils.md b/src/content/docs/config/utils.md index e3f9dab..dee1fe8 100644 --- a/src/content/docs/config/utils.md +++ b/src/content/docs/config/utils.md @@ -131,6 +131,14 @@ const monitor = Utils.monitorFile('/path/to/file', (file, event) => { }) ``` +:::caution +`monitorFile` only reports events that a user-space program +triggers through the filesystem API. As a result, it does not catch +remote events that occur on network filesystems. +Furthermore, most pseudo-filesystems such as `/proc`, `/sys` and `/dev/pts` +cannot be monitored. +::: + ### Canceling the monitor ```js