parent
7d0c47afe2
commit
385ad58fb5
@ -0,0 +1,39 @@
|
||||
package com.platform.test;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import com.platform.utils.FileOperateHelper;
|
||||
|
||||
public class FileOperationTest {
|
||||
|
||||
@Test
|
||||
public void addLastSeparator() {
|
||||
System.out.println(FileOperateHelper.addLastSeparator("D:/gitTmp3/aggregation-platform"));
|
||||
|
||||
}
|
||||
@Test
|
||||
public void removeLastSeparator() {
|
||||
System.out.println(FileOperateHelper.removeLastSeparator("D:/gitTmp3/aggregation-platform/"));
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void fileCreate() {
|
||||
File f = new File("D:/Create1");
|
||||
f.mkdir();
|
||||
File f2 = new File("D:/Create1/1.txt");
|
||||
try {
|
||||
f2.createNewFile();
|
||||
} catch (IOException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
File f3 = new File("D:/Create1");
|
||||
f3.mkdir();
|
||||
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in new issue