File[] files = XMLDirectory.listFiles(filter_xml_files); Arrays.sort(files);
//Arrays.sort(files, Collections.reverseOrder()); //resort for(File _xml_file : files) { ... }reference: http://stackoverflow.com/questions/7199911/how-to-file-listfiles-in-alphabetical-order
Delete:
File file = new File(selectedFilePath); boolean deleted = file.delete();reference: http://stackoverflow.com/questions/1248292/how-to-delete-a-file-from-sd-card
Folder create:
java.io.File file = new java.io.File(save_path); /* if the folder is not exist, create it */ if (!file.exists()) file.mkdirs();
沒有留言:
張貼留言