confusion with directory documentation
A couple notes/questions:
-
open_root_dirandopen_dirboth indicate:Open a directory. You can then read the directory entries in a random order using get_directory_entry.Butget_directory_entrydoesn't exist in the code AFAIK. I seefind_directory_entryanditerate_dirso I assume this must just be left over cruft? -
open_root_dirandopen_dirreturn aDirectory, the docs forclose_dirindicate:Close a directory. You cannot perform operations on an open directory and so must close it if you want to do something with it.butclose_dirconsumes a directory so how do you use it after its closed? For instance, how would you supply a directory toopen_file_in_dir?
looking at this example.. i'm guessing the close_dir documentation is wrong?
https://github.com/rust-embedded-community/embedded-sdmmc-rs/blob/ed1b7eaf5c559d7af3a3ea274049a677f18b1d8c/examples/test_mount.rs#L129-L144
we resolved 1 with that PR but 2 .. the documentation about close_dir is still confusing
I think 2. means you can’t create a file in a directory when the directory is open? Because then you could get iterator invalidation if the entries moved around. But I agree the wording is awful.