mirror of
https://github.com/Xiao-MoMi/Custom-Crops.git
synced 2025-12-23 00:49:33 +00:00
1.5.19-PRE1
This commit is contained in:
@@ -30,6 +30,9 @@ import java.util.List;
|
||||
|
||||
public class BackUp {
|
||||
|
||||
/**
|
||||
* 备份全部文件
|
||||
*/
|
||||
public static void backUpData(){
|
||||
|
||||
List<String> files = Arrays.asList("crop","sprinkler","pot","season");
|
||||
@@ -49,6 +52,12 @@ public class BackUp {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 复制某个文件
|
||||
* @param file_from 源文件
|
||||
* @param file_to 目标文件
|
||||
* @throws IOException IO异常
|
||||
*/
|
||||
private static void backUp(File file_from, File file_to) throws IOException {
|
||||
if(!file_to.exists()){
|
||||
file_to.getParentFile().mkdirs();
|
||||
|
||||
Reference in New Issue
Block a user