makedirs

makedirs(list, options = {}) Class Public methods Alias for: mkdir_p

mkdir

mkdir(list, options = {}) Class Public methods Options: mode noop verbose Creates one or more directories. FileUtils.mkdir 'test' FileUtils.mkdir %w( tmp data ) FileUtils.mkdir 'notexist', :noop => true # Does not really create. FileUtils.mkdir 'tmp', :mode => 0700

mkdir_p

mkdir_p(list, options = {}) Class Public methods Options: mode noop verbose Creates a directory and all its parent directories. For example, FileUtils.mkdir_p '/usr/local/lib/ruby' causes to make following directories, if it does not exist. * /usr * /usr/local * /usr/local/lib * /usr/local/lib/ruby You can pass several directories at a time in a list. mkpath makedirs

mkpath

mkpath(list, options = {}) Class Public methods Alias for: mkdir_p

move

move(src, dest, options = {}) Class Public methods Alias for: mv

mv

mv(src, dest, options = {}) Class Public methods Options: force noop verbose Moves file(s) src to dest. If file and dest exist on the different disk partition, the file is copied then the original file is removed. FileUtils.mv 'badname.rb', 'goodname.rb' FileUtils.mv 'stuff.rb', '/notexist/lib/ruby', :force => true # no error FileUtils.mv %w(junk.txt dust.txt), '/home/aamine/.trash/' FileUtils.mv Dir.glob('test*.rb'), 'test', :noop => true, :verbose => true move

pwd

pwd() Class Public methods Options: (none) Returns the name of the current directory. getwd

remove

remove(list, options = {}) Class Public methods Alias for: rm

remove_dir

remove_dir(path, force = false) Class Public methods Removes a directory dir and its contents recursively. This method ignores StandardError if force is true.

remove_entry

remove_entry(path, force = false) Class Public methods This method removes a file system entry path. path might be a regular file, a directory, or something. If path is a directory, remove it recursively. See also remove_entry_secure.