NetManiac

Witold Rugowski on web20 wave with Ruby on Rails

readable? vs. readable_real?

Posted on August 7, 2006 - Filed Under Ruby

Today I’ve learned, that in Ruby much better way of checking whether file is using File.stat("file").readable_real? than just File.stat("file").readable? Difference is not big, but significant. Using real version allows to check whether file is readable not only when owner and user ID match, but also when file has group readable attribute and user belongs to proper group.

Popularity: 2% [?]

Hits for this post: 2379

Similar Posts

Comments

Leave a Reply