fn add_dirent<W: Writer>( cursor: &mut W, max: usize, d: &DirEntry<'_>, entry: Option<Entry> ) -> Result<usize>