Cold Help System: Programming: ColdC Reference Manual: Functions: File: fstat()


LIST fstat([STRING path])

This function returns information on a file. If the file is not specified as path, then it returns information on the open file on the current object. The information is returned as an ordered list:

  1. STRING octal file mode (see fchmod())
  2. INTEGER file size (in bytes)
  3. INTEGER time when the file was last accessed
  4. INTEGER time when the file data was last modified
  5. INTEGER time when the file status was last changed

For more information refer to the unix manual page on stat. The octal file mode will likely include additional bit fields from what is commonly seen. These represent file attributes, such as directories, FIFO, etc. The last four bits will refer to the permissions. For instance:

fstat("html")
=> ["40775", 512, 855442283, 851293545, 855435595]


dblog() | execute() | fchmod() | fclose() | feof() | fflush() | file() | files() | fmkdir() | fopen() | fread() | fremove() | frename() | frmdir() | fseek() | fstat() | fwrite()


the Cold Dark