title: Deleting files using CodeIgniter?
body: <p>I'm not sure if this is the proper function to delete a single file (say an image) using <a href="http://codeigniter.com" rel="nofollow">CodeIgniter</a>.</p>
  
  <pre><code>$this-&gt;load-&gt;helper('file');    
  delete_files('path')
  </code></pre>
  
  <p><a href="http://codeigniter.com/user_guide/helpers/file_helper.html" rel="nofollow">http://codeigniter.com/user_guide/helpers/file_helper.html</a></p>
  
  <p>However it lists that this function is to delete entire directories, and makes no mention of how it handles individual files (if a path to only 1 file is given).  Before I start testing with it, I figured I would check if anyone has ran into this problem before?</p>
  
  <p>I simply want to use a CodeIgniter function to delete individually uploaded images (say user profile images) but I am unable to find anything in the documentation / user guide that helps me achieve this (yes I know I need to have proper permissions first and all that, but that is out of scope of this question).</p>
  
  <p><strong>regarding unlink()</strong></p>
  
  <p>what I was hoping for is a built in CI function that would alert me to something stupid like "no delete permission" or other factors like "file is in use". I found unlink() to sometimes not work (without throwing me an error). Hence why I asked...</p>