是否有任何标准方法以编程方式在 FreeBSD 中获取文件或目录的创建时间
Is there any standard way to get creation time of file or directory in FreeBSD programatically
我想知道如何在 FreeBSD C 中获取路径的创建时间 API?
例如在Linux中我们可以使用statx since kernel 4.11, or in mac OSX we can use stat64
我想知道FreeBSD有没有像上面那样的方法?有什么 POSIX 标准 function/syscall 吗?
POSIX 的统计函数无法获取文件创建时间。但是,FreeBSD 有 st_birthtim
字段供您使用。
来自 FreeBSD 的 stat 系统调用:
st_birthtim Time when the inode was created.
我想知道如何在 FreeBSD C 中获取路径的创建时间 API?
例如在Linux中我们可以使用statx since kernel 4.11, or in mac OSX we can use stat64
我想知道FreeBSD有没有像上面那样的方法?有什么 POSIX 标准 function/syscall 吗?
POSIX 的统计函数无法获取文件创建时间。但是,FreeBSD 有 st_birthtim
字段供您使用。
来自 FreeBSD 的 stat 系统调用:
st_birthtim Time when the inode was created.