Ruby/File Directory/stat
Материал из Wiki.crossplatform.ru
(Различия между версиями)
Версия 17:10, 26 мая 2010
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