打印

[一般问题] File::archive? 这个方法怎么没有呢

File::archive? 这个方法怎么没有呢

我在fxri的索引中查到的

意思是判断一个文件是否是archive文件

而实际上 编译器会提示 undefined method 'archive?' for File:Class
埋头做事 低头做人

TOP

查了下 可能要 require 'win32/file' , 但没测试成功。
    from (eval):3:in `CreateFile'
    from F:/ruby/lib/ruby/gems/1.8/gems/win32-file-stat-1.2.5/lib/win32/file/stat.rb:547:in `get_file_type'

看样子不是一个比较稳定的方法。
BTW: 我还是以 RubyBook Help 为主要参考资料,fxri 太慢了。
本帖最近评分记录
  • rubylee R币 +3 是的 require 'win32/file'后就好了 2008-4-17 11:28

TOP

2008-11-23 23:13 Crawled by CCBot/1.0 (+http://www.commoncrawl.org/bot.html) @38.103.63.61