| 57 | } |
| 58 | |
| 59 | pub fn workspace_directory<X, S, P>(working_root_dir: X, execution_id: S, dir_name: P) -> Result<PathBuf, Error> |
| 60 | where |
| 61 | X: AsRef<Path>, |
| 62 | S: AsRef<Path>, |
| 63 | P: AsRef<Path>, |
| 64 | { |
| 65 | let dir = working_root_dir |
| 66 | .as_ref() |
| 67 | .join(".qovery-workspace") |
| 68 | .join(execution_id) |
| 69 | .join(dir_name); |
| 70 | |
| 71 | create_dir_all(&dir)?; |
| 72 | |
| 73 | Ok(dir) |
| 74 | } |
| 75 | |
| 76 | fn archive_workspace_directory(working_root_dir: &str, execution_id: &str) -> Result<PathBuf, Error> { |
| 77 | let workspace_dir = root_workspace_directory(working_root_dir, execution_id)?; |