stat
array stat(string filename)
Retrieves file status information.
Returns:
Array of file information; FALSE on error
Description:
Accesses a file’s properties and returns a 13-element array containing various information about the file. The array contains the following elements:
Array Index | Value |
---|---|
0 | Device |
1 | Inode number |
2 | Inode protection mode |
3 | Number of links |
4 | User ID of owner |
5 | Group ID of owner |
6 | Device type if inode device |
7 | Size in bytes |
8 | Time of last access |
9 | Time of last modification |
10 | Time of last change |
11 | Block size for filesystem I/O |
12 | Number of blocks allocated |
Not all entries are filled with meaningful values on all systems. For example, under Windows device type and block size are filled with -1. It’s a good idea to test ...
Get PHP Functions Essential Reference now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.