代码很简单,可能不太友好,但是可以用 import java.io.File; public class Test { public static void main(String[] args) { File directory = new File("D://workspace//代码文件夹名称"); deleteSvnDirectory(directory); } public static void deleteSvnDirectory(File directory) { if (".svn".equals(directory.getName()