From: Robert Klemme Date: 2010-04-05T01:00:08+09:00 Subject: Re: Reading contents of all files from a Directory On 04.04.2010 17:30, Hawksury Gear wrote: > Hassan Schroeder wrote: >> On Sun, Apr 4, 2010 at 8:16 AM, Hawksury Gear >> wrote: >> >>> ... it gives an error message saying >>> >>> "Permission Denied Errno::EACCESS" >>> >>> Any idea why? >> Is there a reason you don't think it means exactly what it says? > > No doubt, the error message is self explanatory. > But the actual files themselves in the directory allow Read and Write > operations so they are not protected against any Read/Write operations.I > have asked for the read-only permission="r" which in theory it should > grant. Your error is most likely caused by the fact that Dir#entries returns file names only, i.e. without a path. You are trying to open different files than you think (most likely in the current directory). Kind regards robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/