how to delete file in document directory

hi guys we are writing ebooks in which we need to download lots of images from our server with inapp (just for giving basic info) my problem is not that problem is after user had read the book if he/she need to delete the book how can we give functionality to delete i think each and every book (lots of images) can be of size around 40-60 mb so it is necessary to give functionality to delete

also is there anything like size limit for data to put in document directory ( i think it’s not it will be as much as free space on device tell me if i am wrong )

any ideas or any API’s that i am missing ??

also one more thing just assume that user has deleted one book and after some time (days or months or anything) he want it back i don’t want to charge for the book for which he had already paid so does this thing can be handle by apple or i have track it internally in db or text files with all his purchased and non purchased books
:slight_smile: [import]uid: 12482 topic_id: 13156 reply_id: 313156[/import]

ok there’s api os.remove( )
http://developer.anscamobile.com/reference/index/osremove to delete file still wondering for next two questions [import]uid: 12482 topic_id: 13156 reply_id: 48282[/import]

There is a store.restore() API you must implement for when the user resets their device or buys a new one. [import]uid: 6787 topic_id: 13156 reply_id: 48496[/import]