新手问题 NotImplementedError: birthtime () function is unimplemented on this machine

LinuxGit · March 16, 2015 · Last by linuxgit replied at March 16, 2015 · 3531 hits
[1] pry(main)> File.birthtime("itself.rb")
NotImplementedError: birthtime() function is unimplemented on this machine
from (pry):1:in `birthtime'

很奇怪,这个方法在我的机器上运行报未实现,ruby 版本是 2.2.1.用 RVM 安装的。求指教。

$ ruby -v
ruby 2.2.1p85 (2015-02-26 revision 49769) [x86_64-linux]

http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap04.html#tag_04_08 在 linux 操作系统中貌似没有文件创建时间的概念。

#1 楼 @king1990_cool 对头。。。Linux 只有 atime mtime ctime 这都搞忘了 谢谢。

You need to Sign in before reply, if you don't have an account, please Sign up first.