2009年4月22日星期三

Ruby 递归删除文件目录

递归删除文件目录:
require 'pathname'
dir=Pathname.new("/home/poole/")
dir.rmtree

#or

require 'fileutils'
FileUtils.rm_r("/home/poole")

没有评论:

发表评论