From: gotoken@... (GOTO Kentaro) Date: 2000-08-24T01:02:20+09:00 Subject: [ruby-list:24430] (RDP) Engurish ftools.rd ごとけんです るびきちさんよろしく。 =begin = ftools.rb Loading `ftools' adds class methods (({copy})), (({move})) etc, to (({File})). == METHOD --- File.copy(from, to, verbose = false) => true or false --- File.cp(from, to, verbose = false) => true or false Copies file ((|from|)) to ((|to|)). If ((|verbose|)) is true, reports progress to stderr. --- File.move(from, to, verbose = false) => true or false --- File.mv(from, to, verbose = false) => true or false Moves file ((|from|)) to ((|to|)). If ((|verbose|)) is true, reports progress to stderr. --- File.compare(file1, file2, verbose = false) => true or false --- File.cmp(file1, file2, verbose = false) => true or false Compares ((|file1|)) and ((|file2|)) and reports whether they are same or not. If ((|verbose|)) is true, reports progress to stderr. --- File.safe_unlink(*files) --- File.rm_f(*files) Deletes ((|files|)) safely, that is, tries chmod at first then deletes. If the last argument of ((|files|)) is not a string then run on verbose mode. --- File.makedirs(*dirs) --- File.mkpath(*dirs) Creates directories ((|dirs|)). Similar to Unix command `mkdir -p'. If the last argument of ((|files|)) is not a string then run on verbose mode. --- File.chmod(mode, *files) Changes mode of ((|files|)). If the last argument of ((|files|)) is not a string then run on verbose mode. --- File.install(from, to, mode = nil, verbose = false) Copies a file ((|from|)) to ((|to|)) and sets its file mode as ((|mode|)). Similar to Unix command `install'. If ((|verbose|)) is true, reports progress to stderr. =end