Skip to content

Instantly share code, notes, and snippets.

@igorzi
Created September 13, 2011 17:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save igorzi/1214441 to your computer and use it in GitHub Desktop.
Save igorzi/1214441 to your computer and use it in GitHub Desktop.
#if _WIN32
typedef struct _stati64 uv_stat;
#else
typedef struct stat uv_stat;
#endif
typedef struct uv_stat_watcher_s uv_stat_watcher_t;
typedef void (*uv_stat_changed_cb)(uv_stat_watcher_t* watcher, stat* previous, stat* current);
struct uv_stat_watcher_s {
UV_HANDLE_FIELDS
uv_stat_changed_cb cb;
char* path;
UV_STAT_WATCHER_PRIVATE_FIELDS
};
/* closed with uv_close() */
int uv_stat_init(uv_loop_t* loop, const char* path, uv_stat_watcher_t* watcher);
int uv_stat_start(uv_stat_watcher_t* watcher, double interval, int persistent, uv_stat_changed_cb cb);
int uv_stat_stop(uv_stat_watcher_t* watcher);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment