A filesystem event delivered by a watcher as
{:fs_notify_event, %FsNotify.Event{}}, mirroring notify-rs's event: one
struct per event, carrying all affected paths (a reconciled rename carries
[from, to]).
kind is the top-level category; detail faithfully mirrors notify-rs's
nested EventKind sub-kinds — a bare atom or a {group, sub} tuple. For
example :create+:file, :modify+{:name, :both}, :access+{:open, :write}.
Note: notify reports different event kinds per platform, so do not rely on a
specific kind/detail for the same operation across OSes. A rename, for
example, may arrive as a reconciled {:name, :both} with [from, to], or as
a separate :remove + :create, depending on the backend and debouncing.
Summary
Types
Access mode for :access open/close events.
Data change for :modify {:data, _} events.
Top-level event category. This is the most important classification; the
finer detail/0 may or may not be available depending on the backend.
Metadata change for :modify {:metadata, _} events.
Rename mode for :modify {:name, _} events.
Types
@type access_mode() :: :any | :execute | :read | :write | :other
Access mode for :access open/close events.
:any— unknown/catch-all:execute— the file was executed, or the folder opened:read— opened for reading:write— opened for writing:other— known but not otherwise representable
@type data_change() :: :any | :size | :content | :other
Data change for :modify {:data, _} events.
:any— unknown/catch-all:size— the data size changed:content— the data content changed:other— known but not otherwise representable
@type detail() :: :any | :other | :file | :folder | :read | {:open, access_mode()} | {:close, access_mode()} | {:data, data_change()} | {:metadata, metadata_kind()} | {:name, rename_mode()}
Sub-kind under kind/0, mirroring notify-rs:
:any/:other— catch-all under any kind:file/:folder— a:create/:removeof a file or directory:read— an:accessread{:open, t:access_mode/0}/{:close, t:access_mode/0}—:accessopen/close{:data, t:data_change/0}— a:modifyof file content{:metadata, t:metadata_kind/0}— a:modifyof metadata{:name, t:rename_mode/0}— a:modifyrename
@type kind() :: :any | :access | :create | :modify | :remove | :other
Top-level event category. This is the most important classification; the
finer detail/0 may or may not be available depending on the backend.
@type metadata_kind() ::
:any
| :access_time
| :write_time
| :permissions
| :ownership
| :extended
| :other
Metadata change for :modify {:metadata, _} events.
:any— unknown/catch-all:access_time— access time changed:write_time— write/modify time changed:permissions— permissions changed:ownership— ownership changed:extended— an extended attribute changed:other— known but not otherwise representable
@type rename_mode() :: :any | :to | :from | :both | :other
Rename mode for :modify {:name, _} events.
:any— unknown/catch-all:to— the path resulting from a rename:from— the path that was renamed away:both— a single event carrying bothfromandtopaths:other— known but not otherwise representable