remove_file

remove_file(path, force = false) Class Public methods Removes a file path. This method ignores StandardError if force is true.

remove_entry_secure

remove_entry_secure(path, force = false) Class Public methods This method removes a file system entry path. path shall be a regular file, a directory, or something. If path is a directory, remove it recursively. This method is required to avoid TOCTTOU (time-of-check-to-time-of-use) local security vulnerability of rm_r. rm_r causes security hole when: * Parent directory is world writable (including /tmp). * Removing directory tree includes world writable directory. * The system

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.

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

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

pwd

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

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

move

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

mkpath

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

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