(account: string, container: string, filePath: string)
| 72 | } |
| 73 | |
| 74 | async getMeta(account: string, container: string, filePath: string): Promise<SigMFMetadata> { |
| 75 | const localDirectory: FileWithDirectoryAndFileHandle[] = this.files; |
| 76 | if (!localDirectory) { |
| 77 | Promise.reject('No local directory found'); |
| 78 | } |
| 79 | let metadataFile: FileWithDirectoryAndFileHandle | undefined = localDirectory.find((file) => { |
| 80 | return file.webkitRelativePath === filePath + '.sigmf-meta' || file.name === filePath + '.sigmf-meta'; |
| 81 | }); |
| 82 | console.debug('metadataFile', metadataFile); |
| 83 | if (!metadataFile) { |
| 84 | return Promise.reject('No file found'); |
| 85 | } |
| 86 | const dataFile = localDirectory.find((file) => { |
| 87 | return file.webkitRelativePath === filePath + '.sigmf-data' || file.name === filePath + '.sigmf-data'; |
| 88 | }); |
| 89 | if (!dataFile) { |
| 90 | return Promise.reject('No file found'); |
| 91 | } |
| 92 | return this.getMetaFromFile(metadataFile, dataFile, account, container); |
| 93 | } |
| 94 | |
| 95 | async smartQuery(queryString: string, signal: AbortSignal): Promise<SmartQueryResult> { |
| 96 | throw new Error('smartQuery not supported for local data sources'); |
nothing calls this directly
no test coverage detected