* Formats the five contentUri object to string * @param {{rootUri: string, docId: string} | String} contentUriObject or rootId * @param {string} [docId] * @returns {string}
(contentUriObject, docId)
| 72 | * @returns {string} |
| 73 | */ |
| 74 | format(contentUriObject, docId) { |
| 75 | let rootUri; |
| 76 | |
| 77 | if (typeof contentUriObject === "string") { |
| 78 | rootUri = contentUriObject; |
| 79 | } else { |
| 80 | rootUri = contentUriObject.rootUri; |
| 81 | docId = contentUriObject.docId; |
| 82 | } |
| 83 | |
| 84 | if (docId) return [rootUri, docId].join("::"); |
| 85 | else return rootUri; |
| 86 | }, |
| 87 | /** |
| 88 | * Gets virtual address by replacing root with name i.e. added in file explorer |
| 89 | * @param {string} url |