转自stackoverflow: http://stackoverflow.com/questions/115983/how-do-i-add-an-empty-directory-to-a-git-repository Another way to make a directory stay empty (in the repo) is to create a .gitignore inside that directory that contains two lines: 在空目录下创建.g
import java.io.File;public class Test{ public static void main(String args[]){ Test t = new Test(); delFolder("c:/bb"); System.out.println("deleted");} //删除文件夹//param folderPath 文件夹完整绝对路径 public static void delFolder(String folderPath)