title: File and Folder Attributes - Programming API
body: <p>I knew that PHP is able to read file content by different ways, for example: fread, file_get_contents, file, readfile, etc.</p>
  
  <p>Currently, I am looking for an API that can read real index of files and folders in specific partition or folder, for example:
  drive d:\ in windows contains three folders (folder1, folder2, folder3), and each folder contains some files, we can get these directory structure using PHP (opendir, scandir, readdir, etc) and list them as I want, however, windows saved file and folder names inside hard-disk with their attributes (size, last modified, created on, etc).</p>
  
  <p>How I can read hard-disc using PHP and retrieving all file and folder attributes for a specific path?
  for instance, if we consider last modified time we can use (filemtime()) function, but this attribute not saved inside the file, its saved some where else inside hard-drive, other attributes also saved in other location not inside the file.</p>
  
  <p>When windows user copying file from flash-drive to local hard, windows will copy all file and folder attributes and saves them inside local hard drive. When using PHP for copying file, it depends on OS to handle this job, its not native support (as I think) for file and folder operations.</p>
  
  <p>Do you have any idea? 
  There are many recovery program that uses this technology for reading hard-drive indexes, however, for PHP: I cant find any source for this problem.</p>
  
  <p>Applications if I get correct answer:
  I can check if such file securely deleted from my hard-drive? I can create secure delete application using PHP, or clearing hard-drive indexes for a given file.</p>
  
  <p>Your help appreciated.</p>