Some of the code from the fatfs example could be moved to the crate and adapted to expose functions more like those in std::fs.
For example, the code in mkdir could become something like std::fs::create_dir<P: AsRef<Path>>(path: P) -> Result<()>. We might be able to provide a new platform-specific implementation of DirBuilder, or at least model the implementation on that.
We could also implement create_dir_all and parts of the API that make sense rather than having consumers reimplement the same thing themselves.
Some of the code from the
fatfsexample could be moved to the crate and adapted to expose functions more like those instd::fs.For example, the code in
mkdircould become something likestd::fs::create_dir<P: AsRef<Path>>(path: P) -> Result<()>. We might be able to provide a new platform-specific implementation ofDirBuilder, or at least model the implementation on that.We could also implement
create_dir_alland parts of the API that make sense rather than having consumers reimplement the same thing themselves.