Subject: Re: cp_r is not working
From: xavier nayrac <xavier.nayrac gmail.com>
Date: Thu, 3 Feb 2011 16:49:56 +0900
References: 377922377924377944
In-reply-to: 377944
Eliran Bz a écrit :
> How can I SKIP the "." and ".."?
> Do you have an Idea?
One way:
Dir.foreach(path) do |file|
next if ['.', '..'].include?(file)
puts file
end
--
Xavier Nayrac
http://undeveloppeur.wordpress.com