(path: string, supportedTypes?: PathType[], unsupportedTypeMessage?: string)
| 92 | } |
| 93 | |
| 94 | getPath(path: string, supportedTypes?: PathType[], unsupportedTypeMessage?: string): Path { |
| 95 | const p = new Path(this.sdk, this.photosSdk, path, this.eventsManager); |
| 96 | if (supportedTypes && !supportedTypes.includes(p.type)) { |
| 97 | throw new ValidationError(unsupportedTypeMessage || `Path "${path}" is not supported`); |
| 98 | } |
| 99 | return p; |
| 100 | } |
| 101 | |
| 102 | getPublicLinkPath(path: string): PublicLinkPath { |
| 103 | if (!this.publicLinkSdk) { |