/// Dumps all magic entries in the given database `filenames` in a human readable format
Dumps all magic entries in the given database `filenames` in a human readable format
Dumps all magic entries in the given database ` filenames ` in a human readable format
pub fn list(&self, filenames: &[&str]) -> Result<(), MagicError> {
        let cstring;
        let dbs = if filenames.len() == 0 {
            ptr::null()
        } else {
            cstring = CString::new(filenames.join(":")).map_err(|e| MagicError {
                desc: format!("{:?}", e),
            })?;
            cstring.as_ptr()
        };
        if unsafe { ffi::magic_list(self.cookie, dbs) } == 0 {
            Ok(())
        } else {
            Err(self.magic_failure())
        }
    }
pub fn list ( & self , filenames : & [ & str ] ) -> Result < ( ) , MagicError > { let cstring ; let dbs = if filenames . len ( ) == 0 { ptr :: null ( ) } else { cstring = CString :: new ( filenames . join ( " " ) ) . map_err ( | e | MagicError { desc : format ! ( " " e ) , } ) ? ; cstring . as_ptr ( ) } ; if unsafe { ffi :: magic_list ( self . cookie , dbs ) } == 0 { Ok ( ( ) ) } else { Err ( self . magic_failure ( ) ) } }
Dumps all magic entries in the given database `filenames` in a human readable format
Dumps all magic entries in the given database ` filenames ` in a human readable format
&self
<not_specific>
filenames
&[&str]
<not_specific>