fts::ffi::fts_open
[−]
[src]
pub unsafe extern fn fts_open(path_argv: *const *const c_char, options: c_int, compar: Option< extern "C" fn(*const *const FTSENT, *const *const FTSENT) -> c_int>) -> *mut FTS
fts_open() in fts.h
C function
FTS *fts_open(char * const *path_argv, int options,
int (*compar)(const FTSENT **, const FTSENT **));
Safety
path_argv
must be a pointer of a null-terminated array of C strings( null-terminated ).
options
must contain either FTS_LOGICAL
or FTS_PHYSICAL
.
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 ) };