Changes permission bits on the named files (in list
) to the bit pattern represented by mode
.
mode
is the symbolic and absolute mode can be used.
Absolute mode is
FileUtils.chmod 0755, 'somecommand' FileUtils.chmod 0644, %w(my.rb your.rb his.rb her.rb) FileUtils.chmod 0755, '/usr/bin/ruby', verbose: true
Symbolic mode is
FileUtils.chmod "u=wrx,go=rx", 'somecommand' FileUtils.chmod "u=wr,go=rr", %w(my.rb your.rb his.rb her.rb) FileUtils.chmod "u=wrx,go=rx", '/usr/bin/ruby', verbose: true
is user, group, other mask.
is user’s mask.
is group’s mask.
is other’s mask.
is write permission.
is read permission.
is execute permission.
is execute permission for directories only, must be used in conjunction with “+”
is uid, gid.
is sticky bit.
is added to a class given the specified mode.
Is removed from a given class given mode.
Is the exact nature of the class will be given a specified mode.
Changes permission bits on the named files (in list
) to the bit pattern represented by mode
.
mode
is the symbolic and absolute mode can be used.
Absolute mode is
FileUtils.chmod 0755, 'somecommand' FileUtils.chmod 0644, %w(my.rb your.rb his.rb her.rb) FileUtils.chmod 0755, '/usr/bin/ruby', verbose: true
Symbolic mode is
FileUtils.chmod "u=wrx,go=rx", 'somecommand' FileUtils.chmod "u=wr,go=rr", %w(my.rb your.rb his.rb her.rb) FileUtils.chmod "u=wrx,go=rx", '/usr/bin/ruby', verbose: true
is user, group, other mask.
is user’s mask.
is group’s mask.
is other’s mask.
is write permission.
is read permission.
is execute permission.
is execute permission for directories only, must be used in conjunction with “+”
is uid, gid.
is sticky bit.
is added to a class given the specified mode.
Is removed from a given class given mode.
Is the exact nature of the class will be given a specified mode.
Changes permission bits on the named files (in list
) to the bit pattern represented by mode
.
FileUtils.chmod_R 0700, "/tmp/app.#{$$}" FileUtils.chmod_R "u=wrx", "/tmp/app.#{$$}"
Changes permission bits on the named files (in list
) to the bit pattern represented by mode
.
FileUtils.chmod_R 0700, "/tmp/app.#{$$}" FileUtils.chmod_R "u=wrx", "/tmp/app.#{$$}"
Changes owner and group on the named files (in list
) to the user user
and the group group
. user
and group
may be an ID (Integer/String) or a name (String
). If user
or group
is nil, this method does not change the attribute.
FileUtils.chown 'root', 'staff', '/usr/local/bin/ruby' FileUtils.chown nil, 'bin', Dir.glob('/usr/bin/*'), verbose: true
Changes owner and group on the named files (in list
) to the user user
and the group group
. user
and group
may be an ID (Integer/String) or a name (String
). If user
or group
is nil, this method does not change the attribute.
FileUtils.chown 'root', 'staff', '/usr/local/bin/ruby' FileUtils.chown nil, 'bin', Dir.glob('/usr/bin/*'), verbose: true
Changes owner and group on the named files (in list
) to the user user
and the group group
recursively. user
and group
may be an ID (Integer/String) or a name (String
). If user
or group
is nil, this method does not change the attribute.
FileUtils.chown_R 'www', 'www', '/var/www/htdocs' FileUtils.chown_R 'cvs', 'cvs', '/var/cvs', verbose: true
Changes owner and group on the named files (in list
) to the user user
and the group group
recursively. user
and group
may be an ID (Integer/String) or a name (String
). If user
or group
is nil, this method does not change the attribute.
FileUtils.chown_R 'www', 'www', '/var/www/htdocs' FileUtils.chown_R 'cvs', 'cvs', '/var/cvs', verbose: true
Updates modification time (mtime) and access time (atime) of file(s) in list
. Files are created if they don’t exist.
FileUtils.touch 'timestamp' FileUtils.touch Dir.glob('*.c'); system 'make'
Updates modification time (mtime) and access time (atime) of file(s) in list
. Files are created if they don’t exist.
FileUtils.touch 'timestamp' FileUtils.touch Dir.glob('*.c'); system 'make'
Returns an Array
of names of high-level methods that accept any keyword arguments.
p FileUtils.commands #=> ["chmod", "cp", "cp_r", "install", ...]
Set
the changed state of this object. Notifications will be sent only if the changed state
is true
.
state
Boolean indicating the changed state of this Observable
.
Returns true if this object’s state has been changed since the last notify_observers
call.
The standard configuration object for gems.
Use the given configuration object (which implements the ConfigFile
protocol) as the standard configuration object.
The path to the data directory specified by the gem name. If the package is not available as a gem, return nil.
A Zlib::Deflate.deflate
wrapper
Retrieve the PathSupport
object that RubyGems uses to lookup files.
Initialize the filesystem paths to use from env
. env
is a hash-like object (typically ENV
) that is queried for ‘GEM_HOME’, ‘GEM_PATH’, and ‘GEM_SPEC_CACHE’ Keys for the env
hash should be Strings, and values of the hash should be Strings or nil
.
Set
array of platforms this RubyGems supports (primarily for testing).