From: Michel Date: 2013-01-30T23:24:41+09:00 Subject: Re: Dir.glob problem --=-fmqBzHKOaW2tPJy9K7O9 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit For example : To process only the files in the directory and in its sub-directories : Dir.glob("**/*") {|x| if File.directory?(x) then # it's a directory else # It's a file ... } > Michael W Ryder wrote in post #896942: > > David Vlad wrote: > >> wrong." So now this forum is my last resort, why on earth dosnt this > >> work?! > > > > Looking at the source code for Dir it looks like it should accept the > > above directory separators if the macro DOSISH is defined. Where is > > this defined? It looks like it is part of the build process so I would > > assume it would be defined if building for a Windows platform. > > > To avoid "." and "." how to use the Dir::glob() method? Give me an > example. > > Please > --=-fmqBzHKOaW2tPJy9K7O9 Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: 7bit For example : To process only the files in the directory and in its sub-directories :

Dir.glob("**/*") {|x|
  if File.directory?(x) then  # it's a directory
  else # It's a file ...
}

Michael W Ryder wrote in post #896942:
> David Vlad wrote:
>> wrong." So now this forum is my last resort, why on earth dosnt this
>> work?!
>
> Looking at the source code for Dir it looks like it should accept the
> above directory separators if the macro DOSISH is defined.  Where is
> this defined?  It looks like it is part of the build process so I would
> assume it would be defined if building for a Windows platform.


To avoid "." and "." how to use the Dir::glob() method? Give me an 
example.

Please


--=-fmqBzHKOaW2tPJy9K7O9--