From 70e7be55dd6278745caee94117e7d00c27940164 Mon Sep 17 00:00:00 2001 From: Corner Date: Sun, 7 Jul 2024 11:03:04 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=A4=8D=E5=88=B6=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E7=9A=84=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 + copyFile.py | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 copyFile.py diff --git a/.gitignore b/.gitignore index 862dee3..0f0a455 100644 --- a/.gitignore +++ b/.gitignore @@ -45,3 +45,4 @@ bin/ /%SystemDrive%/ /.idea/ /TV/ +res diff --git a/copyFile.py b/copyFile.py new file mode 100644 index 0000000..1869c41 --- /dev/null +++ b/copyFile.py @@ -0,0 +1,22 @@ +import os +import shutil + + +def copy_folder(source_folder, destination_folder): + if not os.path.exists(destination_folder): + os.makedirs(destination_folder) + + for item in os.listdir(source_folder): + source = os.path.join(source_folder, item) + destination = os.path.join(destination_folder, item) + + if os.path.isdir(source): + copy_folder(source, destination) + else: + shutil.copy2(source, destination) + +os.makedirs("./res/json") +os.makedirs("./res/jar") +copy_folder("json", "res/json") +copy_folder("jar", "res/jar") +