Skip to content

Commit

Permalink
Create file_utils.py
Browse files Browse the repository at this point in the history
  • Loading branch information
KOSASIH authored Aug 14, 2024
1 parent b9b0818 commit a7d1814
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions projects/PiNetAI/utils/file_utils.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# file_utils.py

import os
import shutil

def create_directory(path):
os.makedirs(path, exist_ok=True)

def delete_directory(path):
shutil.rmtree(path, ignore_errors=True)

def copy_file(src, dst):
shutil.copyfile(src, dst)

def move_file(src, dst):
shutil.move(src, dst)

0 comments on commit a7d1814

Please sign in to comment.