The current state of MFS and its coupling with UnixFS don't make this a high priority issue; this is only valuable in connection with https://github.com/ipfs/go-ipfs/issues/8106: if we can refactor this code outside of the repo we can avoid adding more sharding logic here that just extends the technical debt.
MFS should deal only with the UnixFS Directory interface and not with its (basic and HAMT) implementations:
The tradeoff of removing this here is adding another layer of indirection in UnixFS that can transition from one implementation to another when needed (as MFS does here).
The current state of MFS and its coupling with UnixFS don't make this a high priority issue; this is only valuable in connection with https://github.com/ipfs/go-ipfs/issues/8106: if we can refactor this code outside of the repo we can avoid adding more sharding logic here that just extends the technical debt.
MFS should deal only with the UnixFS
Directory
interface and not with its (basic and HAMT) implementations:https://github.com/ipfs/go-mfs/blob/9c9a0feabc16e92bbcfd1d4d0873d6a0e28948b9/dir.go#L374-L385
https://github.com/ipfs/go-mfs/blob/9c9a0feabc16e92bbcfd1d4d0873d6a0e28948b9/dir.go#L166-L167
The tradeoff of removing this here is adding another layer of indirection in UnixFS that can transition from one implementation to another when needed (as MFS does here).