(parentNode: NodeEntity, pathString: string)
| 288 | } |
| 289 | |
| 290 | private async getNodeByPath(parentNode: NodeEntity, pathString: string) { |
| 291 | let node = parentNode; |
| 292 | const pathParts = splitPathSegments(pathString); |
| 293 | for (const part of pathParts) { |
| 294 | if (part === '') { |
| 295 | continue; |
| 296 | } |
| 297 | if (isNodeUid(part)) { |
| 298 | node = await this.sdk.getNode(part); |
| 299 | } else { |
| 300 | node = await this.getNodeByName(node, part); |
| 301 | } |
| 302 | } |
| 303 | return node; |
| 304 | } |
| 305 | |
| 306 | private async getNodeByName(parentNode: NodeEntity, name: string) { |
| 307 | // Albums are not folders, so they cannot be traversed with the Drive SDK. |
no test coverage detected