saoudrizwan / Disk

Easily persist structs, images, and data on iOS
MIT License
3.1k stars 170 forks source link

How to remove a struct to file ? #19

Closed KnightJoker closed 6 years ago

KnightJoker commented 6 years ago

Hello, think to your Disk! When i use the library, the remove method is not friendly to me. About issue#4,whether there is a similar method to remove a struct to file with data of the same type.

In my handling, I can only remove this file and then save another file. I think it's very bad, hope you can give me a better suggestion or solution.Thinks~

saoudrizwan commented 6 years ago

You can just retrieve your structs first, modify your array of structs (remove/add/etc) and then re-save it to the same file name.