Check if task exists in tasks directory.
(task_name)
| 14 | |
| 15 | |
| 16 | def check_task_exists(task_name): |
| 17 | """Check if task exists in tasks directory.""" |
| 18 | tasks_dir = Path("tasks") |
| 19 | task_path = tasks_dir / task_name |
| 20 | |
| 21 | if not task_path.exists(): |
| 22 | print(f"Error: Task '{task_name}' does not exist in the tasks directory.") |
| 23 | return False |
| 24 | |
| 25 | if not task_path.is_dir(): |
| 26 | print(f"Error: '{task_name}' exists but is not a directory.") |
| 27 | return False |
| 28 | |
| 29 | return True |
| 30 | |
| 31 | |
| 32 | def wipe_sandbox_directory(): |