Changing the description way of path.

This commit is contained in:
little-cat-sweet 2021-10-12 14:32:20 +08:00
parent 2b473127c5
commit e8c26ab878
2 changed files with 5 additions and 5 deletions

View File

@ -45,7 +45,7 @@ public class XhpcDownCodeServiceImpl implements IXhpcDownCodeService {
List<Map<String,Object>> list = xhpcDownCodeMapper.selectExcelDataByPileId(pileId);
System.out.println(list);
File file1 = new File("Material");
File file1 = new File("/www/wwwroot/xhpc.scxhua.com/dist/Material");
File file2 = new File(file1, "pictures");
if(file1.exists()){
deleteFiles(file1);
@ -91,7 +91,7 @@ public class XhpcDownCodeServiceImpl implements IXhpcDownCodeService {
}
System.out.println(list);
//5写入
OutputStream fos = new FileOutputStream(file1.getAbsoluteFile() + "\\data.xls");
OutputStream fos = new FileOutputStream(file1.getAbsoluteFile() + "/data.xls");
workbook.write(fos);
workbook.close();
fos.close();
@ -156,7 +156,7 @@ public class XhpcDownCodeServiceImpl implements IXhpcDownCodeService {
}
System.out.println(list);
//5写入
OutputStream fos = new FileOutputStream(file1.getAbsoluteFile() + "\\data.xls");
OutputStream fos = new FileOutputStream(file1.getAbsoluteFile() + "/data.xls");
workbook.write(fos);
workbook.close();
fos.close();

View File

@ -62,8 +62,8 @@ public class DownMaterialUtil {
}
String real = str.substring(poke + 1);
System.out.println(real);
System.out.println(file.getName() + "\\" + real);
fileOutputStream = new FileOutputStream(file.getAbsoluteFile() + "\\" + real);
System.out.println(file.getName() + "/" + real);
fileOutputStream = new FileOutputStream(file.getAbsoluteFile() + "/" + real);
while ((len = inputStream.read(data)) != -1) {
fileOutputStream.write(data, 0, len);