Ruby/File Directory/stat
Материал из Wiki.crossplatform.ru
Версия от 17:57, 13 сентября 2010; ViGOur (Обсуждение | вклад)
Compares File::Stat objects by comparing their respective modification times.
f1 = File.new("f1", "w") sleep 1 f2 = File.new("f2", "w") f1.stat <=> f2.stat # Methods in Comparable are also available f1.stat > f2.stat # false f1.stat < f2.stat # true