Struct fswatch_sys::FswSession [] [src]

pub struct FswSession { /* fields omitted */ }

A session in fswatch, revolving around a handle.

Calling new creates a new handle, initiating a new session. Options can be set before calling start_monitor.

Methods

impl FswSession
[src]

Create a new session and handle, using the given monitor type.

Create a new session and handle, usin gthe system default monitor type.

This is a convenience method for FswSession::new(FswMonitorType::SystemDefaultMonitorType).

Add a path to watch for this session.

Add a custom property to this session.

Set whether to allow overflow for this session.

Set the callback for this session.

The callback will receive a Vec<FswCEvent>, which is a copy of the events given by fswatch.

Calling this multiple times will cause this session to use the last callback specified, but due to the limited functions in the C API, the previous callbacks will never be freed from memory, causing a memory leak.

Set the latency for this session.

Set whether this session should be recursive.

Set whether this session should be directory only.

Set whether this session should follow symlinks.

Add an event filter for the given event flag.

Add a filter.

Start monitoring for this session.

Depending on the monitor you are using, this method may block.

Destroy this session, freeing it from memory and invalidating its handle.

This is called automatically when the session goes out of scope.

Trait Implementations

impl Debug for FswSession
[src]

Formats the value using the given formatter.

impl IntoIterator for FswSession
[src]

The type of the elements being iterated over.

Which kind of iterator are we turning this into?

Creates an iterator from a value. Read more

impl Drop for FswSession
[src]

A method called when the value goes out of scope. Read more