Ruby check permission

Discussion in 'Ruby' started by ingcarlos, Jun 24, 2010.

  1. ingcarlos

    ingcarlos Guest

    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.
     
    ingcarlos, Jun 24, 2010
    #1
    1. Advertising

  2. On Thu, Jun 24, 2010 at 3:10 PM, ingcarlos <> 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 :) ( look for File::Stat )

    --
    Hassan Schroeder ------------------------
    twitter: @hassan
     
    Hassan Schroeder, Jun 24, 2010
    #2
    1. Advertising

  3. ingcarlos

    Lee Jarvis Guest

    [Note: parts of this message were removed to make it a legal post.]

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

    On 24 June 2010 23:10, ingcarlos <> 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).
    >
    > Any Ideas?.
    >
    > Tnx for a soon reply.
    >
    >
     
    Lee Jarvis, Jun 24, 2010
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jonas Nilsson

    Check permission on files and directories

    Jonas Nilsson, Aug 13, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    434
    Jonas Nilsson
    Aug 13, 2003
  2. TK
    Replies:
    3
    Views:
    403
    Jim Cheshire [MSFT]
    Jul 14, 2004
  3. TK

    Permission check for secured subfolders?

    TK, Jul 12, 2004, in forum: ASP .Net Security
    Replies:
    5
    Views:
    153
    Andy Mortimer [MS]
    Jul 23, 2004
  4. Ronald Fischer
    Replies:
    1
    Views:
    167
    Ronald Fischer
    Jun 18, 2007
  5. Math55

    How to check writing permission?

    Math55, Jul 10, 2003, in forum: Perl Misc
    Replies:
    0
    Views:
    99
    Math55
    Jul 10, 2003
Loading...

Share This Page