def self.install_builtin_commands
normal_delegation_file_methods = [
["atime", ["FILENAME"]],
["basename", ["fn", "*opts"]],
["chmod", ["mode", "*FILENAMES"]],
["chown", ["owner", "group", "*FILENAME"]],
["ctime", ["FILENAMES"]],
["delete", ["*FILENAMES"]],
["dirname", ["FILENAME"]],
["ftype", ["FILENAME"]],
["join", ["*items"]],
["link", ["FILENAME_O", "FILENAME_N"]],
["lstat", ["FILENAME"]],
["mtime", ["FILENAME"]],
["readlink", ["FILENAME"]],
["rename", ["FILENAME_FROM", "FILENAME_TO"]],
["split", ["pathname"]],
["stat", ["FILENAME"]],
["symlink", ["FILENAME_O", "FILENAME_N"]],
["truncate", ["FILENAME", "length"]],
["utime", ["atime", "mtime", "*FILENAMES"]]]
def_builtin_commands(File, normal_delegation_file_methods)
alias_method :rm, :delete
def_builtin_commands(FileTest,
FileTest.singleton_methods(false).collect{|m| [m, ["FILENAME"]]})
normal_delegation_ftools_methods = [
["syscopy", ["FILENAME_FROM", "FILENAME_TO"]],
["copy", ["FILENAME_FROM", "FILENAME_TO"]],
["move", ["FILENAME_FROM", "FILENAME_TO"]],
["compare", ["FILENAME_FROM", "FILENAME_TO"]],
["safe_unlink", ["*FILENAMES"]],
["makedirs", ["*FILENAMES"]],
["install", ["FILENAME_FROM", "FILENAME_TO", "mode"]],
]
def_builtin_commands(File,
normal_delegation_ftools_methods)
alias_method :cmp, :compare
alias_method :mv, :move
alias_method :cp, :copy
alias_method :rm_f, :safe_unlink
alias_method :mkpath, :makedirs
end