Spaces:
Sleeping
Sleeping
fix: if not file_path.exists() - dir_path.mkdir(parents=True, exist_ok=True) #, mode=0o2644)
Browse files44 unmodified lines4546474849505144 unmodified lines# Create the parent directory if it doesn't exist.# `parents=True` creates any missing parent directories.# `exist_ok=True` prevents an error if the directory already exists.dir_path.mkdir(parents=True, exist_ok=True, mode=0o2644)file_path = dir_path / filename # Concatenate directory and filename to get full pathif not file_path.exists(): # Create the file if it doesn't exist44 unmodified lines4546474849505144 unmodified lines# Create the parent directory if it doesn't exist.# `parents=True` creates any missing parent directories.# `exist_ok=True` prevents an error if the directory already exists.dir_path.mkdir(parents=True, exist_ok=True) #, mode=0o2644)file_path = dir_path / filename # Concatenate directory and filename to get full pathif not file_path.exists(): # Create the file if it doesn't exist
file_handler/file_utils.py+1-1