XFSWatchEventType

typedef enum{
  x_fs_watch_CREATED,
  x_fs_watch_DELETED,
  x_fs_watch_MODIFIED,
  x_fs_watch_RENAMED_FROM,
  x_fs_watch_RENAMED_TO,
  x_fs_watch_UNKNOWN
}XFSWatchEventType;
Function in stdx_filesystem.h

x_fs_watch_close

Close a filesystem watcher.

X_FILESYSTEM_API void x_fs_watch_close(XFSWatch *fw);

Parameters

XFSWatch *fw
Watch handle to close.

Returns

Nothing.

Function in stdx_filesystem.h

x_fs_watch_open

Open a filesystem watcher for the given path.

X_FILESYSTEM_API XFSWatch * x_fs_watch_open(const char *path);

Parameters

const char *path
Path to watch (directory or file, depending on platform support).

Returns

Watch handle, or NULL on failure.

Function in stdx_filesystem.h

x_fs_watch_poll

Poll a filesystem watcher for pending events.

X_FILESYSTEM_API int32_t x_fs_watch_poll(
 XFSWatch *fw,
 XFSWatchEvent *out_events,
 int32_t max_events
);

Parameters

XFSWatch *fw
Watch handle.
XFSWatchEvent *out_events
Output array to receive events.
int32_t max_events
Maximum number of events to write to out_events.

Returns

Number of events written, or a negative value on error.