title: How to remove Temporary Directory files fron iOS app?
body: <p>i used code for remove Temporary Directory files when using device.</p>
  
  <pre><code>-(void) clearAllTempFiles {
      NSString *path = NSTemporaryDirectory();
      if ([path length] &gt; 0)
      {
          NSError *error = nil;  
          NSFileManager *fileManager = [NSFileManager defaultManager];
  
          BOOL deleted = [fileManager removeItemAtPath:path error:&amp;error];
  
          if (deleted != YES || error != nil)
          {
  
          }
          else{
              // Recreate the Documents directory
              [fileManager createDirectoryAtPath:path withIntermediateDirectories:NO attributes:nil error:&amp;error];
          }
  
      }
  }
  </code></pre>
  
  <p>it's not working fine? this is right code for deleting files from Temporary Directory?</p>
  
  <p>pls help me? </p>