|
Safemotion Lib
|
Classes | |
| class | JsonEncoder |
| json 저장할 때 필요한 클래스 More... | |
| class | MyEncoder |
Functions | |
| save_keep_index (sorted_keep_index, crop_image_path, test_image_list, save_path) | |
| search_file (folder, fileEx) | |
| search_folder (folder) | |
| create_directory (directory) | |
| save_json (data, path) | |
| load_json (path) | |
| copy_file (src_path, dst_path) | |
| utils_os.copy_file | ( | src_path, | |
| dst_path ) |
파일을 복사하는 기능
args:
src_path (str): 복사하려는 파일 경로
dst_path (str): 복사한 파일을 저장하는 경로
Definition at line 110 of file utils_os.py.
| utils_os.create_directory | ( | directory | ) |
디렉토리를 생성하는 기능
하위 디렉토리를 모두 생성함
args:
directory (str): 생성하려는 디렉토리
Definition at line 53 of file utils_os.py.
| utils_os.load_json | ( | path | ) |
json 파일을 로드하는 기능
args:
path (str): json 파일 경로
return (dict): json 파일의 데이터
Definition at line 95 of file utils_os.py.
| utils_os.save_json | ( | data, | |
| path ) |
json 파일을 저장하는 기능
args:
data (dict): 데이터
path (str): 저장 경로
Definition at line 82 of file utils_os.py.
| utils_os.save_keep_index | ( | sorted_keep_index, | |
| crop_image_path, | |||
| test_image_list, | |||
| save_path ) |
Definition at line 22 of file utils_os.py.
| utils_os.search_file | ( | folder, | |
| fileEx ) |
폴더에서 특정 확장자의 파일을 검색하는 기능
하위 폴더까지 모두 검색
args:
folder (str): 검색하려는 폴더
fileEx (str): 파일 확장자
return:
file_name_list (list[str]): 파일 이름 리스트
file_path_list (list[str]): 파일 경로 리스트
Definition at line 6 of file utils_os.py.
| utils_os.search_folder | ( | folder | ) |
폴더내부에 있는 폴더를 검색하는 기능
args:
folder (str): 검색하려는 폴더
return:
sub_folder_name_list (list[str]): 폴더명 리스트
sub_folder_path_list (list[str]): 폴더 경로 리스트
Definition at line 32 of file utils_os.py.