获取由 filename 指定的文件的统计信息。如果 filename 是符号连接,则统计信息是关于被连接文件本身的,而不是符号连接。lstat() 和 stat() 相同,只除了它会返回符号连接的状态。
如果出错,stat() 返回 FALSE。
返回一个数组包含有文件的统计信息。该数组具有以下单元:
device - 设备名
inode - 节点名
inode protection mode - 节点保护模式
number of links - 连接数目
user id of owner - 所有者的用户 id
group id owner - 所有者的组 id
device type if inode device *
size in bytes - 文件大小的字节数
time of last access - 上一次被访问时间
time of last modification - 上一次被修改时间
time of last change - 上一次改变时间
blocksize for filesystem I/O *
number of blocks allocated - 所分配块的数目
注: 本函数的结果会被缓存。详细信息参见 clearstatcache()。
注: 本函数不能作用于远程文件,被检查的文件必须通过服务器的文件系统访问。
参见 lstat(),filemtime() 和 filegroup()。