Skip to content

merge Dev #7953

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 31, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
fix: 去除hutool导致地图文件初始化失败
  • Loading branch information
fit2cloud-chenyw committed Jan 31, 2024
commit 96e40e7d7ad1aeb7d70f3aff3151d10e9c85d82a
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,6 @@ public static String getSuffix(String fileName) {
return fileName.substring(fileName.lastIndexOf(".") + 1);
}

public static void main(String[] args) {
String name = "test.text";
System.out.println(getSuffix(name));
System.out.println(getPrefix(name));

String dirPath = "/opt/dataease/plugins/default";
List<String> strings = listFileNames(dirPath);
assert strings != null;
strings.forEach(System.out::println);
}

public static boolean exist(String path) {
return new File(path).exists();
Expand Down Expand Up @@ -101,6 +91,11 @@ public static boolean isFile(File file) {
public static void move(File file, File target, boolean replace) {
if (!file.exists()) return;
try {
String parentPath = target.getParent();
File parentDir = new File(parentPath);
if (!parentDir.exists()) {
parentDir.mkdirs();
}
Files.move(file.toPath(), target.toPath(), StandardCopyOption.REPLACE_EXISTING);
} catch (IOException e) {
throw new RuntimeException(e);
Expand Down