python/ray/tune/utils/file_transfer.py
def _delete_path(target_path: str) -> bool:
    """Delete path (files and directories)"""
    if os.path.exists(target_path):
        if os.path.isdir(target_path):
            shutil.rmtree(target_path)
        else:
            os.remove(target_path)
        return True
    return False
Delete path (files and directories)
Delete path (files and directories)
Delete path ( files and directories )
def _delete_path(target_path: str) -> bool:
    if os.path.exists(target_path):
        if os.path.isdir(target_path):
            shutil.rmtree(target_path)
        else:
            os.remove(target_path)
        return True
    return False
def _delete_path ( target_path : str ) -> bool : if os . path . exists ( target_path ) : if os . path . isdir ( target_path ) : shutil . rmtree ( target_path ) else : os . remove ( target_path ) return True return False
Delete path (files and directories)
Delete path ( files and directories )
"""Delete path (files and directories)"""
target_path
str