stat.html 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
  2. <html lang="en">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  5. <meta http-equiv="Content-Style-Type" content="text/css">
  6. <link rel="up" title="FatFs" href="../00index_e.html">
  7. <link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
  8. <title>FatFs - f_stat</title>
  9. </head>
  10. <body>
  11. <div class="para">
  12. <h2>f_stat</h2>
  13. <p>The f_stat gets the file status.</p>
  14. <pre>
  15. FRESULT f_stat (
  16. const char* <em>FileName</em>, /* Pointer to the file or directory name */
  17. FILINFO* <em>FileInfo</em> /* Pointer to the FILINFO structure */
  18. );
  19. </pre>
  20. </div>
  21. <div class="para">
  22. <h4>Parameters</h4>
  23. <dl class="par">
  24. <dt>FileName</dt>
  25. <dd>Pointer to the null-terminated string that specifies the <a href="filename.html">file or directory</a> to get its information.</dd>
  26. <dt>FileInfo</dt>
  27. <dd>Pointer to the blank <tt>FILINFO</tt> structure to store the information.</dd>
  28. </dl>
  29. </div>
  30. <div class="para">
  31. <h4>Return Values</h4>
  32. <dl class="ret">
  33. <dt>FR_OK (0)</dt>
  34. <dd>The function succeeded.</dd>
  35. <dt>FR_NO_FILE</dt>
  36. <dd>Could not find the file or directory.</dd>
  37. <dt>FR_NO_PATH</dt>
  38. <dd>Could not find the path.</dd>
  39. <dt>FR_INVALID_NAME</dt>
  40. <dd>The file name is invalid.</dd>
  41. <dt>FR_INVALID_DRIVE</dt>
  42. <dd>The drive number is invalid.</dd>
  43. <dt>FR_NOT_READY</dt>
  44. <dd>The disk drive cannot work due to no medium in the drive or any other reason.</dd>
  45. <dt>FR_RW_ERROR</dt>
  46. <dd>The function failed due to a disk error or an internal error.</dd>
  47. <dt>FR_NOT_ENABLED</dt>
  48. <dd>The logical drive has no work area.</dd>
  49. <dt>FR_NO_FILESYSTEM</dt>
  50. <dd>There is no valid FAT partition on the disk.</dd>
  51. </dl>
  52. </div>
  53. <div class="para">
  54. <h4>Description</h4>
  55. <p>The f_stat gets the information of a file or directory. For details of the infomation, refer to the <tt>FILINFO</tt> structure. This function is not supported in minimization level of &gt;= 1.</p>
  56. </div>
  57. <div class="para">
  58. <h4>References</h4>
  59. <p><tt><a href="opendir.html">f_opendir</a>, <a href="readdir.html">f_readdir</a>, <a href="sfileinfo.html">FILINFO</a></tt></p>
  60. </div>
  61. <p class="foot"><a href="../00index_e.html">Return</a></p>
  62. </body>
  63. </html>