From 72b1542a430e167d0f0a4720d8d391ceea7050a4 Mon Sep 17 00:00:00 2001 From: Nicholas Tindle Date: Wed, 28 Jan 2026 01:02:46 -0600 Subject: [PATCH] refactor(backend): remove unused workspace_file_exists function This function was defined but never imported or called anywhere. Callers can use get_workspace_file_by_path() directly and check if the result is None. Co-Authored-By: Claude Opus 4.5 --- .../backend/backend/data/workspace.py | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/autogpt_platform/backend/backend/data/workspace.py b/autogpt_platform/backend/backend/data/workspace.py index 431e2b6725..a5791767fd 100644 --- a/autogpt_platform/backend/backend/data/workspace.py +++ b/autogpt_platform/backend/backend/data/workspace.py @@ -259,24 +259,6 @@ async def soft_delete_workspace_file( return updated -async def workspace_file_exists( - workspace_id: str, - path: str, -) -> bool: - """ - Check if a file exists at the given path in the workspace. - - Args: - workspace_id: The workspace ID - path: Virtual path to check - - Returns: - True if file exists, False otherwise - """ - file = await get_workspace_file_by_path(workspace_id, path) - return file is not None - - async def get_workspace_total_size(workspace_id: str) -> int: """ Get the total size of all files in a workspace.