(url: string)
| 191 | } |
| 192 | |
| 193 | async remove(url: string): Promise<void> { |
| 194 | try { |
| 195 | const directory = await this.getScopedDirectory(); |
| 196 | const baseName = await this.hashUrl(url); |
| 197 | await this.removeEntryIfExists( |
| 198 | directory, |
| 199 | this.getPayloadFilename(baseName), |
| 200 | ); |
| 201 | await this.removeEntryIfExists( |
| 202 | directory, |
| 203 | this.getRecordFilename(baseName), |
| 204 | ); |
| 205 | } catch (err) { |
| 206 | this.resetDirectoryOnInvalidStateError(err); |
| 207 | throw err; |
| 208 | } |
| 209 | } |
| 210 | |
| 211 | private async getStoredEntry( |
| 212 | url: string, |