In ruby API there is an example

 s = File.stat("testfile")
   sprintf("%o", s.mode)          #=> "100644"

I need to check the last three numbers from the octal notation which is
"644"
which means:
rw- for user
r-- for group
r-- for other

Does anyone know how i could check just those three numbers and leave
the rest

Regards
Loftz
-- 
Posted via http://www.ruby-forum.com/.