lstat.html 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <html>
  2. <head>
  3. <title>lstat</title>
  4. <body bgcolor=#ffffff>
  5. <h2 align=center>lstat</h2>
  6. <h4 align=center>OS/161 Reference Manual</h4>
  7. <h3>Name</h3>
  8. lstat - get file state information
  9. <h3>Library</h3>
  10. Standard C Library (libc, -lc)
  11. <h3>Synopsis</h3>
  12. #include &lt;sys/stat.h&gt;<br>
  13. <br>
  14. int<br>
  15. lstat(const char *<em>pathname</em>, struct stat *<em>statbuf</em>);
  16. <h3>Description</h3>
  17. lstat retrieves status information about the file referred to by
  18. <em>pathname</em> and stores it in the stat structure pointed to
  19. by <em>statbuf</em>.
  20. <p>
  21. If <em>pathname</em> refers to a symbolic link, information about the
  22. link is retrieved rather than about the object the link points to.
  23. <h3>Return Values</h3>
  24. On success, lstat returns 0. On error, -1 is returned, and
  25. <A HREF=errno.html>errno</A> is set according to the error
  26. encountered.
  27. <h3>Errors</h3>
  28. The following error codes should be returned under the conditions
  29. given. Other error codes may be returned for other errors not
  30. mentioned here.
  31. <blockquote><table width=90%>
  32. <td width=10%>&nbsp;</td><td>&nbsp;</td></tr>
  33. <tr><td>ENODEV</td> <td>The device prefix of <em>filename</em> did
  34. not exist.</td></tr>
  35. <tr><td>ENOTDIR</td> <td>A non-final component of <em>pathname</em>
  36. was not a directory.</td></tr>
  37. <tr><td>ENOENT</td> <td>The named file does not exist.</td></tr>
  38. <tr><td>EIO</td> <td>A hard I/O error occurred.</td></tr>
  39. <tr><td>EFAULT</td> <td><em>statbuf</em> points to an invalid address.</td></tr>
  40. </table></blockquote>
  41. </body>
  42. </html>