Link.d.ts 984 B

12345678910111213141516171819202122232425262728293031323334
  1. import { EventEmitter } from 'events';
  2. import type { Node } from './Node';
  3. import type { Superblock } from './Superblock';
  4. /**
  5. * Represents a hard link that points to an i-node `node`.
  6. */
  7. export declare class Link extends EventEmitter {
  8. vol: Superblock;
  9. parent: Link | undefined;
  10. children: Map<string, Link | undefined>;
  11. private _steps;
  12. node: Node;
  13. ino: number;
  14. length: number;
  15. name: string;
  16. get steps(): string[];
  17. set steps(val: string[]);
  18. constructor(vol: Superblock, parent: Link | undefined, name: string);
  19. setNode(node: Node): void;
  20. getNode(): Node;
  21. createChild(name: string, node?: Node): Link;
  22. setChild(name: string, link?: Link): Link;
  23. deleteChild(link: Link): void;
  24. getChild(name: string): Link | undefined;
  25. getPath(): string;
  26. getParentPath(): string;
  27. getName(): string;
  28. toJSON(): {
  29. steps: string[];
  30. ino: number;
  31. children: string[];
  32. };
  33. syncSteps(): void;
  34. }