import { Storage } from './Storage';
import { FileType, type Statistics } from '../../types';
-import { AsyncLock, AsyncLockType, Constants, FileUtils, Utils } from '../../utils';
+import { AsyncLock, AsyncLockType, Constants, ErrorUtils, Utils } from '../../utils';
export class JsonFileStorage extends Storage {
private fd: number | null = null;
);
})
.catch((error) => {
- FileUtils.handleFileException(
+ ErrorUtils.handleFileException(
this.dbName,
FileType.PerformanceRecords,
error as NodeJS.ErrnoException,
this.fd = fs.openSync(this.dbName, 'a+');
}
} catch (error) {
- FileUtils.handleFileException(
+ ErrorUtils.handleFileException(
this.dbName,
FileType.PerformanceRecords,
error as NodeJS.ErrnoException,
this.fd = null;
}
} catch (error) {
- FileUtils.handleFileException(
+ ErrorUtils.handleFileException(
this.dbName,
FileType.PerformanceRecords,
error as NodeJS.ErrnoException,