pathlib - Serbipunk/notes GitHub Wiki
warning: join operator's unseen error
in the case of A / B
, if B
is an absolute Path and os.path.join(str(A), str(B))
doesn't exist, it would return B
.
dst_folder
PosixPath('/Users/zznz/data/deepsuit_reprocessed_v2_records_256')
dst_folder / "images" / name
PosixPath('/Users/zznz/data/deepsuit_reprocessed_v2_records/images/20210624_120723_M010247_regular_F00000.jpg')
name
'/Users/zznz/data/deepsuit_reprocessed_v2_records/images/20210624_120723_M010247_regular_F00000.jpg'