(directory: &Path)
| 30 | |
| 31 | impl ServerDir { |
| 32 | pub fn open(directory: &Path) -> crate::Result<Self> { |
| 33 | let path = resolve_active_directory(directory); |
| 34 | if !path.is_dir() { |
| 35 | return error(format!("{path:?} is not a directory")); |
| 36 | } |
| 37 | Ok(Self { |
| 38 | path: absolute_path(path), |
| 39 | }) |
| 40 | } |
| 41 | |
| 42 | pub fn create(directory: &Path, record: &FullAccessRecord) -> crate::Result<ServerDir> { |
| 43 | let dir_path = create_new_server_dir(directory)?; |
no test coverage detected