1 | import { Oid } from './oid';
|
2 | import { OdbObject } from './odb-object';
|
3 | import { OdbExpandId } from './odb-expand-id';
|
4 | import { Object } from './object';
|
5 |
|
6 | export namespace Odb {
|
7 | const enum STREAM {
|
8 | RDONLY = 2,
|
9 | WRONLY = 4,
|
10 | RW = 6,
|
11 | }
|
12 | }
|
13 |
|
14 | export class Odb {
|
15 | static open(objectsDir: string): Promise<Odb>;
|
16 |
|
17 | addDiskAlternate(path: string): number;
|
18 |
|
19 | free(): void;
|
20 | read(id: Oid): Promise<OdbObject>;
|
21 | write(data: Buffer, len: number, type: Object.TYPE): Promise<Oid>;
|
22 | expandIds(ids: OdbExpandId, count: number): number;
|
23 | }
|