Login or Sign up Help | Site Map
Connecting Tech Pros Worldwide

Reading files/folders and creating a zip file

Question posted by: PythonUser1 (Newbie) on June 13th, 2008 03:44 AM
Hi,

I am using RubyZip and want to read a folder and keep all the sub folders and files and create a .zip file.

Please give me ant sample code on the same.

I tried to read a file like this

file3=open("Ruby/Samples","r")
puts file

Throws permission denied error.

Thanks
User
Would you like to answer this question?
Sign up for a free account, or Login (if you're already a member).
acoder's Avatar
acoder
Site Moderator
10,698 Posts
June 26th, 2008
11:23 AM
#2

Re: Reading files/folders and creating a zip file
Look into the Dir class.

Reply
Reply
Not the answer you were looking for? Post your question . . .
180,785 Experts ready to help you find a solution.
Sign up for a free account, or Login (if you're already a member).

Top Ruby / Rails Forum Contributors