Skip to main content

encode_entries

Function encode_entries 

Source
pub fn encode_entries(
    entries: &[FindEntry],
    level: u16,
    unicode: bool,
) -> (Vec<u8>, Option<usize>)
Expand description

Encode entries into the chained NextEntryOffset form used by FIND_FIRST2/NEXT2 responses. Returns the buffer plus the offset of the last entry (LastNameOffset).

The final entry carries NextEntryOffset == 0; intermediate strides are 4-byte aligned as clients require. Names are UTF-16LE when the client negotiated Unicode, else OEM bytes.