fts::ffi::fts_set [] [src]

pub unsafe extern fn fts_set(ftsp: *mut FTS, f: *const FTSENT, options: c_int) -> c_int

fts_set() in fts.h

C function

int fts_set(FTS *ftsp, FTSENT *f, int options);

Safety

ftsp must be a valid pointer of struct FTS.

f must be a valid pointer of struct FTSENT.

options must be FTS_AGAIN, FTS_FOLLOW or FTS_SKIP.

Examples

let path   = std::ffi::CString::new( "." ).unwrap().as_ptr();
let paths  = vec![path, std::ptr::null()];
let fts    = unsafe { fts::ffi::fts_open( paths.as_ptr(), fts::ffi::FTS_LOGICAL, None ) };
let ftsent = unsafe { fts::ffi::fts_read( fts ) };
let _      = unsafe { fts::ffi::fts_set( fts, ftsent, fts::ffi::FTS_AGAIN ) };