iphone - Do you need to delete imported files from Documents/Inbox? -


i've got ios app imported files email attachment. i've noticed once i'm finished it places imported file documents/inbox.

should app deleting these files or os around clearing them out?

if so, how? i've tried:

[[nsfilemanager defaultmanager] removeitematpath:[self.url path] error:nil]; 

however doesn't seem reference file in inbox, though self.url correct path import file.

system not clear imported files, should clear them manually when necessary, not delete documents directory.

how clear nsdocumentsdirectory can find here

if want delete files inbox use same code adding

... nsstring *path = [nsstring stringwithformat:@"%@/inbox", documentsdirectory ]; nsarray *directorycontents = [filemgr contentsofdirectoryatpath:error:&error]; ... 

read reference

from apple doc:

use directory access files app asked open outside entities. specifically, mail program places email attachments associated app in directory; document interaction controllers may place files in it.

your app can read , delete files in directory cannot create new files or write existing files. if user tries edit file in directory, app must silently move out of directory before making changes.

the contents of directory backed itunes.


Popular posts from this blog

How to calculate SNR of signals in MATLAB? -

c# - Attempting to upload to FTP: System.Net.WebException: System error -

ios - UISlider customization: how to properly add shadow to custom knob image -