Convert two storage objects to a file path
(iContainer string, iObject string)
| 154 | |
| 155 | // Convert two storage objects to a file path |
| 156 | func fsObjectsToPath(iContainer string, iObject string) string { |
| 157 | // Remove schemes |
| 158 | container := fsRemoveScheme(iContainer) |
| 159 | object := fsRemoveScheme(iObject) |
| 160 | |
| 161 | // Extract the container name |
| 162 | container, _ = fsNamesFromFileStorageObject(container) |
| 163 | |
| 164 | // Extract just the object name |
| 165 | _, object = fsNamesFromFileStorageObject(object) |
| 166 | |
| 167 | // Construct them into a composite name |
| 168 | name := fsConstruct(container, object) |
| 169 | |
| 170 | // Expand to path |
| 171 | path := fsPath(name) |
| 172 | |
| 173 | // Done |
| 174 | return path |
| 175 | } |
| 176 | |
| 177 | // It is quite catastrophic if we attempt to delete the entire file storage root, because for NTN |
| 178 | // recovery is simply impossible. As such, we treat this like a 'bug check' and forbid the operation. |
no test coverage detected