Fix on Writer
This commit is contained in:
@@ -181,6 +181,10 @@ export class DataWriter<T> {
|
||||
this.indexWriter.writeFlags(flags);
|
||||
}
|
||||
|
||||
getFlags(): number {
|
||||
return this.indexWriter.getFlags();
|
||||
}
|
||||
|
||||
getStats() {
|
||||
return {
|
||||
dataPath: this.dataPath,
|
||||
|
||||
@@ -161,6 +161,11 @@ export class IndexWriter {
|
||||
return this.latestSequence;
|
||||
}
|
||||
|
||||
getFlags(): number {
|
||||
if (!this.headerBuf) throw new Error('Index file not opened');
|
||||
return this.headerBuf.readUInt32LE(41);
|
||||
}
|
||||
|
||||
writeHeader(): void {
|
||||
if (!this.headerBuf || this.fd === null) return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user