uptodate?

uptodate?(new, old_list) Class Public methods Options: (none) Returns true if newer is newer than all old_list. Non-existent files are older than any file. FileUtils.uptodate?('hello.o', %w(hello.c hello.h)) or \ system 'make hello.o'

touch

touch(list, options = {}) Class Public methods Options: noop verbose 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'

symlink

symlink(src, dest, options = {}) Class Public methods Alias for: ln_s

safe_unlink

safe_unlink(list, options = {}) Class Public methods Alias for: rm_f

rmtree

rmtree(list, options = {}) Class Public methods Alias for: rm_rf

rmdir

rmdir(list, options = {}) Class Public methods Options: noop, verbose Removes one or more directories. FileUtils.rmdir 'somedir' FileUtils.rmdir %w(somedir anydir otherdir) # Does not really remove directory; outputs message. FileUtils.rmdir 'somedir', :verbose => true, :noop => true

rm_rf

rm_rf(list, options = {}) Class Public methods Options: noop verbose secure Equivalent to #rm_r(list, :force => true) WARNING: This method causes local vulnerability. Read the documentation of rm_r first. rmtree

rm_r

rm_r(list, options = {}) Class Public methods Options: force noop verbose secure remove files list[0] list[1]⦠If list[n] is a directory, removes its all contents recursively. This method ignores StandardError when :force option is set. FileUtils.rm_r Dir.glob('/tmp/*') FileUtils.rm_r '/', :force => true # :-) WARNING: This method causes local vulnerability if one of parent directories or removing directory tree are world writable (including /tmp, whose permission is

rm_f

rm_f(list, options = {}) Class Public methods Options: noop verbose Equivalent to #rm(list, :force => true) safe_unlink

rm

rm(list, options = {}) Class Public methods Options: force noop verbose Remove file(s) specified in list. This method cannot remove directories. All StandardErrors are ignored when the :force option is set. FileUtils.rm %w( junk.txt dust.txt ) FileUtils.rm Dir.glob('*.so') FileUtils.rm 'NotExistFile', :force => true # never raises exception remove