in src/lib.rs [49:88]
fn DIE_FreeMemoryA(str: *const i8);
fn DIE_ScanFileA(fname: *const i8, flags: u32, db: *const i8) -> *const i8;
fn DIE_ScanFileExA(fname: *const i8, flags: u32) -> *mut i8;
fn DIE_ScanMemoryA(mem: *const u8, len: u32, flags: u32, db: *const i8) -> *mut i8;
fn DIE_ScanMemoryExA(mem: *const u8, len: u32, flags: u32) -> *mut i8;
fn DIE_LoadDatabaseA(fname: *const i8) -> i32;
}
/// Scans a file at the specified path using the provided scan flags.
///
/// # Description
///
/// This function performs a scan on the file located at `fpath`. The behavior of the scan
/// can be customized using the `flags` parameter, which allows for various scanning options
/// such as deep scanning, heuristic analysis, and result formatting.
///
/// # Parameters
///
/// - `fpath`: A reference to a `Path` object representing the file path to be scanned.
/// - `flags`: An instance of `ScanFlags` that specifies the scanning options to be applied.
///
/// # Returns
///
/// - `Result<String>`: On success, returns a `String` containing the scan results. If the scan
/// fails, it returns an appropriate error wrapped in a `Result`.
///
/// # Example
///
/// ```rust
/// # use std::path::Path;
/// use die::{scan_file, ScanFlags};
/// let path = Path::new("example.txt");
/// let flags = ScanFlags::DEEP_SCAN | ScanFlags::VERBOSE;
/// match scan_file(&path, flags) {
/// Ok(results) => println!("Scan results: {}", results),
/// Err(e) => eprintln!("Error scanning file: {}", e),
/// }
/// ```
///
pub fn scan_file(fpath: &Path, flags: ScanFlags) -> Result<String> {