title: Using rmdir() and RemoveDirectory() can a deleted file be recovered?
body: <p>If you use a code like below to delete a file that was created by your code, where does that file get deleted too? Can the file be recovered? </p>
  
  <pre><code>function RemoveDirectory($path){    
  
  foreach(glob("{$path}/*") as $file)
      {
          if(is_dir($file)) { 
          RemoveDirectory($file);
          } else {
              unlink($file);
          }
      }
      rmdir($path);
  } 
  </code></pre>
  
  <p>Let's just say I called this directory at the wrong time in the code, and I have regrets. </p>