From: Roger Pack Date: 2009-10-10T07:04:46+09:00 Subject: Re: File.addmod? > File.class_eval do > def self.addmod(flags, filename) > themode=stat(filename).mode | flags > chmod(themode, filename) > end > end > > Although there's no error checking and the return value could probably > be something better (like themode). > > So after defining that, your 'u+r' would be: > File.addmod(0200, 'filename') Much thanks. -r -- Posted via http://www.ruby-forum.com/.