好恐怖呀,用file类的delete()删除的文件,都不会进入回收站。。。相当于shift+delete,而且连提示都没有!
用substring可以获取文件的名字,不带后缀!!
File file = new File(path);
String name = file.getName();
name=name.substring(0, name.length()-4);
好恐怖呀,用file类的delete()删除的文件,都不会进入回收站。。。相当于shift+delete,而且连提示都没有!
用substring可以获取文件的名字,不带后缀!!
File file = new File(path);
String name = file.getName();
name=name.substring(0, name.length()-4);