Skip to main content

detect_entries_format

Function detect_entries_format 

Source
pub fn detect_entries_format<P>(path: P) -> Result<EntriesFormat, DictError>
where P: AsRef<Path>,
Expand description

Read the first 4 bytes of a file and return the format.

ยงErrors

Returns DictError::Io if the file cannot be read, or DictError::Format if the magic bytes are unrecognised.