Can we add a flag to optionally output hash in MFS while adding/creating Directory/Files?

I am working on an application which adds a directory or a file in MFS and pins it on ipfs-cluster.

The thing that seems to be missing to me is the fact that MFS methods don’t give me back the hash of the Directory/File created using mkdir or write.

Right now, I have to ls to get all the objects in the MFS. I know that MFS is not supposed to return the hashes as aims to mimic the unix file system, so it should not output any hashes.

But adding a flag to optionally return the hashes can be useful for some class of applications.

If it seems legit to add a flag then I can work out a PR for go-ipfs.

@whyrusleeping @stebalien

Sounds reasonable. Could you file an issue?

Sure thing. Here it is: #6326

1 Like