def deleteDirectory(dirPath)
if File.directory?(dirPath)
puts "是文件夹";
Dir.foreach(dirPath) do |subFile|
if subFile != '.' and subFile != '..'
deleteDirectory(File.join(dirPath, subFile));
end
end
Dir.rmdir(dirPath);
else
File.delete(dirPath);
end
end
puts "删除完毕"
deleteDirectory(File.join(Dir.getwd, 'uexBrokenLine'));

最新文章

  1. python3的基础练习题
  2. Unity 碰撞器
  3. 【HDU 5855】Less Time, More profit(网络流、最小割、最大权闭合子图)
  4. Effective C++ -----条款53:不要轻忽编译期的警告
  5. struts.xml配置
  6. EF 之 MVC 排序,查询,分页 Sorting, Filtering, and Paging For MVC About EF
  7. Linux操作系统备份之一:使用LVM快照实现Linux操作系统数据的在线备份
  8. 【转】Haproxy安装及配置
  9. NeHe OpenGL教程 第二十四课:扩展
  10. easyui 页签
  11. Contest20140705 testB DP
  12. 屏幕录制:SCR Screen Recorder Pro v0.14.3汉化破解版
  13. Linux 终端部分重要快捷键
  14. MVC:Controller向View传值方式总结
  15. UVALive 4992 Jungle Outpost(半平面交)
  16. APP测试中iOS和Android的区别
  17. Flask —— 信号(5)
  18. SpringBoot使用AOP
  19. io流和序列化
  20. [py]类的专有方法

热门文章

  1. CentOS7 编译安装LNMP
  2. 训练赛 Grouping(强连通分量缩点 + DAG求最长路)
  3. codeforece Round#311 BCDE
  4. 【Web优化】Yslow优化法则(四)启用Gzip压缩
  5. SQL注入问题
  6. Oracle SQL Lesson (9) - 操作数据(增删改)
  7. C++ Primer高速学习 第一章 获得二:输入和输出 (IO)
  8. 【leetcode】LRU
  9. 分析java.lang.NullPointerException thrown in RelativeLayout measure()
  10. Windows Phone 8 - Runtime Location API - 2