Skip to content

Commit 1e1df0f

Browse files
authored
Merge pull request #22 from MaxiHafer/docs/add-warning-for-pseudo-fs
docs: add warning for monitoring pseudo filesystems
2 parents 3d73b70 + c95d875 commit 1e1df0f

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

src/content/docs/config/custom-service.md

+9
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,15 @@ const service = new BrightnessService;
100100
export default service;
101101
```
102102

103+
:::caution
104+
`Utils.monitorFile` only reports events that a user-space program
105+
triggers through the filesystem API. As a result, it does not catch
106+
remote events that occur on network filesystems.
107+
Furthermore, most pseudo-filesystems such as `/proc`, `/sys` and `/dev/pts`
108+
cannot be monitored.
109+
:::
110+
111+
103112
:::note
104113
For `bind` to work, the property has to be defined in `Service.register`
105114
:::

src/content/docs/config/utils.md

+8
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,14 @@ const monitor = Utils.monitorFile('/path/to/file', (file, event) => {
131131
})
132132
```
133133

134+
:::caution
135+
`monitorFile` only reports events that a user-space program
136+
triggers through the filesystem API. As a result, it does not catch
137+
remote events that occur on network filesystems.
138+
Furthermore, most pseudo-filesystems such as `/proc`, `/sys` and `/dev/pts`
139+
cannot be monitored.
140+
:::
141+
134142
### Canceling the monitor
135143

136144
```js

0 commit comments

Comments
 (0)