zoukankan      html  css  js  c++  java
  • fstat

    #fstat读取到的信息
     ["dev"]=> int(16777220)
     ["ino"]=> int(66880002)
     ["mode"]=> int(33188)
     ["nlink"]=> int(1)
     ["uid"]=> int(501)
     ["gid"]=> int(0)
     ["rdev"]=> int(0)
     //文件大小(单位:字节)
     ["size"]=> int(99)
     //最近打开时间
     ["atime"]=> int(1473608386)
     //内容修改时间
     ["mtime"]=> int(1473607901) 
     //文件限修改时间
     ["ctime"]=> int(1473607921) 
     ["blksize"]=> int(4096)
     ["blocks"]=> int(8)

    需要注意的一点是:

    文件的 access time,atime 是在读取文件或者执行文件时更改的,即每次打开文件都会更新

    文件的 modified time,mtime 是在写入文件时随文件内容的更改而更改的。

    文件的 create time,ctime 是在写入文件、更改所有者、权限或链接设置时随inode 的内容更改而更改的

    因此,更改文件的内容即会更改 mtime 和 ctime,但是文件的 ctime 可能会在 mtime 未发生任何变化时更改 ,比如 在权限更改,但是文件内容没有变化的情况下。


    各字段说明:

  • 相关阅读:
    OSVERSIONINFOEX structure
    VS系列开发工具发展概述
    VS2008与QT4.6集成
    windows nt service 框架
    Rair
    如何在进程之间共享内核对象
    GOOGLE
    如何获取错误消息说明使用 FormatMessage API
    EnableDebugPriv;
    汇编语言资料
  • 原文地址:https://www.cnblogs.com/gaoxiaoniu/p/5864174.html
Copyright © 2011-2022 走看看