Skip to content

Commit

Permalink
docs: add warning for monitoring pseudo filesystems
Browse files Browse the repository at this point in the history
  • Loading branch information
maxihafer committed Mar 12, 2024
1 parent 3d73b70 commit c95d875
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/content/docs/config/custom-service.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
:::
Expand Down
8 changes: 8 additions & 0 deletions src/content/docs/config/utils.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c95d875

Please sign in to comment.