(parentNode: NodeEntity, name: string)
| 304 | } |
| 305 | |
| 306 | private async getNodeByName(parentNode: NodeEntity, name: string) { |
| 307 | // Albums are not folders, so they cannot be traversed with the Drive SDK. |
| 308 | // Resolve their children through the Photos SDK instead. |
| 309 | if (parentNode.type === NodeType.Album) { |
| 310 | return this.getAlbumChildByName(parentNode, name); |
| 311 | } |
| 312 | for await (const maybeChild of this.driveSdk.iterateFolderChildren(parentNode)) { |
| 313 | if (getName(maybeChild) === name) { |
| 314 | return maybeChild; |
| 315 | } |
| 316 | } |
no test coverage detected