import * as fs from "fs-extra";
import { InsightError } from "../controller/IInsightFacade";
export default class QueryPersister {
constructor() {}
public async persistQuery(dir: string): Promise<any> {
try {
return await fs.readJson(dir);
} catch (_e) {
throw new InsightError(`persistQuery: dataset doesn't exist`);
}
}
}