Closed ec1oud closed 2 years ago
This has been the pattern for adding options to the API calls: https://github.com/ferristseng/rust-ipfs-api/pull/61
It's not so important though, because offline means it will never be published, only local, which is not what I was looking for.
The offline option is kind of important because it's the only sane way that allows checking whether content is local: https://discuss.ipfs.io/t/how-to-check-if-an-ipfs-object-is-on-your-local-node/1250/2 I was planning on adding it for that.
@ferristseng That pattern won't help in this case, since it's a global option, applicable to any command.
I suppose #87 closes this?
ipfs name publish bafy... --offline
works fast on the command line, but by default we still wait for the publishing to succeed, so rust code that calls name_publish is slow. There should be a way to give the offline option to any function, including this one. See https://github.com/ipfs/js-ipfs/pull/2569 and sorry if I'm missing something; I'm still new to rust.