We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
def process_input_file(output_dir, root, file): if not os.path.exists(f'{output_dir}'): os.makedirs(f'{output_dir}', exist_ok=True) src_path = f"{root}/{file}" dst_path = f"{output_dir}/{file}" if os.path.exists(f"{output_dir}/{file}"): # 这里使用 Ctrl + C 停止程序会出bug, shutil.copy 会拷贝文件到一半停止 src_size = os.path.getsize(src_path) dst_size = os.path.getsize(dst_path) if src_size == dst_size: return dst_path shutil.copy( src=src_path, dst=dst_path ) return dst_path
The text was updated successfully, but these errors were encountered:
能否使用代码块打印出来呢~
Sorry, something went wrong.
No branches or pull requests
def process_input_file(output_dir, root, file):
if not os.path.exists(f'{output_dir}'):
os.makedirs(f'{output_dir}', exist_ok=True)
src_path = f"{root}/{file}"
dst_path = f"{output_dir}/{file}"
if os.path.exists(f"{output_dir}/{file}"):
# 这里使用 Ctrl + C 停止程序会出bug, shutil.copy 会拷贝文件到一半停止
src_size = os.path.getsize(src_path)
dst_size = os.path.getsize(dst_path)
if src_size == dst_size:
return dst_path
shutil.copy(
src=src_path,
dst=dst_path
)
return dst_path
The text was updated successfully, but these errors were encountered: