(dir: string)
| 261 | } |
| 262 | |
| 263 | function removeDir(dir: string) { |
| 264 | try { |
| 265 | const items = readdirSync(dir); |
| 266 | const itemPaths = items.map((i) => join(dir, i)); |
| 267 | itemPaths.forEach((itemPath) => { |
| 268 | if (statSync(itemPath).isDirectory()) { |
| 269 | removeDir(itemPath); |
| 270 | } else { |
| 271 | unlinkSync(itemPath); |
| 272 | } |
| 273 | }); |
| 274 | rmSync(dir); |
| 275 | } catch (e) { |
| 276 | /**/ |
| 277 | } |
| 278 | } |
| 279 | |
| 280 | async function cityApp( |
| 281 | req: Request, |