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