|
|
@ -7,6 +7,7 @@ import java.io.File; |
|
|
|
import java.io.FileInputStream; |
|
|
|
import java.io.FileInputStream; |
|
|
|
import java.io.FileOutputStream; |
|
|
|
import java.io.FileOutputStream; |
|
|
|
import java.io.IOException; |
|
|
|
import java.io.IOException; |
|
|
|
|
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* file tool |
|
|
|
* file tool |
|
|
@ -160,8 +161,8 @@ public class FileUtil { |
|
|
|
return filePath.substring(filePath.lastIndexOf("/") + 1); |
|
|
|
return filePath.substring(filePath.lastIndexOf("/") + 1); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public static String createListFile(String listPath, String[] fileArray) { |
|
|
|
public static String createListFile(String listPath, List<String> fileList) { |
|
|
|
if ((TextUtils.isEmpty(listPath) || fileArray == null || fileArray.length == 0)) { |
|
|
|
if ((TextUtils.isEmpty(listPath) || fileList == null || fileList.size() == 0)) { |
|
|
|
return null; |
|
|
|
return null; |
|
|
|
} |
|
|
|
} |
|
|
|
FileOutputStream outputStream = null; |
|
|
|
FileOutputStream outputStream = null; |
|
|
@ -179,7 +180,7 @@ public class FileUtil { |
|
|
|
} |
|
|
|
} |
|
|
|
outputStream = new FileOutputStream(listFile); |
|
|
|
outputStream = new FileOutputStream(listFile); |
|
|
|
StringBuilder fileBuilder = new StringBuilder(); |
|
|
|
StringBuilder fileBuilder = new StringBuilder(); |
|
|
|
for (String file : fileArray) { |
|
|
|
for (String file : fileList) { |
|
|
|
fileBuilder |
|
|
|
fileBuilder |
|
|
|
.append("file") |
|
|
|
.append("file") |
|
|
|
.append(" ") |
|
|
|
.append(" ") |
|
|
|