Ruby check permission

I wanna know how to check for a permission in a file, 'cause I see
there is a method for changing the file permisison but there is no
method to get the current ls -l (-l string).

Any Ideas?.

Tnx for a soon reply.

On Thu, Jun 24, 2010 at 3:10 PM, ingcarlos [email protected]
wrote:

I wanna know how to check for a permission in a file, 'cause I see
there is a method for changing the file permisison but there is no
method to get the current ls -l (-l string).

The API doc is your friend :slight_smile: ( look for File::Stat )

Check out the File::Stat class:
http://ruby-doc.org/core/classes/File/Stat.html