littlefs2
littlefs2 copied to clipboard
Filename/Path maxima
The path::{Filename,Path}
objects are not very well-developed yet. I am aware of the following issues:
- It would be nice to use
heapless::Vec
for paths, and handle back and forth with C strings in littlefs-sys ergonomically - Our
Path
is more likestd::path::PathBuf
, we want to "follow std::path as much as appropriate" - Upstream has no notion (I believe) of maximum path, whereas we should
- Upstream uses
LFS_NAME_MAX
inlfs_info_t
(https://github.com/ARMmbed/littlefs/blob/master/lfs.h#L257), which we can only override vialittlefs2-sys
features. If we don't, thenFILENAME_MAX_PLUS_ONE
should be removed (set to its default of 256) - From the path machinery (ancestors etc.), at least
join
(ortry_join
) needs a clean implementation, need to decide how to handle length overflows (maybe just truncate?)