Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

feat: files.unlink #1101

Closed
wants to merge 1 commit into from
Closed

feat: files.unlink #1101

wants to merge 1 commit into from

Conversation

AquiGorka
Copy link
Member

Original ref: #1043

This change adds the method unlink to the files component.

I have read the discussiones (here & here) and understand files are not deleted from the network (if another peer has pinned them, then the files can still be distributed).

We are working on a web project where we add files to the network and we wanted to remove the files to clear some space locally. With this method the files get unlinked locally.

License: MIT
Signed-off-by: Jorge Ludlow <gorka@aquigorka.com>
@daviddias daviddias changed the title Files: add unlink files files.unlink Nov 25, 2017
@daviddias
Copy link
Member

Hi @AquiGorka, please create a proposal to add this method at spec repo by creating an issue https://github.com/ipfs/interface-ipfs-core/issues

@daviddias
Copy link
Member

as a note, #1045 needs to be shipped first

@daviddias daviddias added status/ready Ready to be worked P2 Medium: Good to have, but can wait until someone steps up labels Jan 25, 2018
@daviddias daviddias changed the title files.unlink feat: files.unlink May 29, 2018
@alanshaw
Copy link
Member

Apologies for the long pause! Would it be more appropriate to add this as an option to pin.rm? You could then garbage collect any IPLD content added to IPFS not just files.

Hi @AquiGorka, please create a proposal to add this method at spec repo by creating an issue https://github.com/ipfs/interface-ipfs-core/issues

Did that issue ever get created? Can I get a link?

link => self._ipldResolver.bs.delete(new CID(link.multihash)),
() => self._ipldResolver.bs.delete(cid, callback)
)
)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will delete 1 level of links, but if the links have links then they should also be deleted as per pin rm --recursive.

@AquiGorka
Copy link
Member Author

Did that issue ever get created? Can I get a link?

https://github.com/ipfs/interface-ipfs-core/issues/176

@alanshaw
Copy link
Member

alanshaw commented Feb 7, 2019

@alanshaw alanshaw closed this Feb 7, 2019
@ghost ghost removed the status/ready Ready to be worked label Feb 7, 2019
MicrowaveDev pushed a commit to galtproject/js-ipfs that referenced this pull request May 22, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
P2 Medium: Good to have, but can wait until someone steps up
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants