Class IndexDirInode<T>

Inode for a directory. Currently only contains the directory listing.

Type Parameters

  • T

Hierarchy

  • IndexDirInode

Implements

Constructors

Properties

_ls: {
    [path: string]: IndexInode;
} = {}

Type declaration

data: T = null

Methods

  • Add the given item to the directory listing. Note that the given inode is not copied, and will be mutated by the DirInode if it is a DirInode.

    Parameters

    • p: string

      Item name to add to the directory listing.

    • inode: IndexInode

      The inode for the item to add to the directory inode.

    Returns boolean

    True if it was added, false if it already existed.

  • Returns the directory listing for this directory. Paths in the directory are relative to the directory's path.

    Returns string[]

    The directory listing for this directory.

  • Return a Stats object for this inode.

    Returns Stats

    Todo

    Should probably remove this at some point. This isn't the responsibility of the FileIndex.

  • Removes the given item from the directory listing.

    Parameters

    • p: string

      Name of item to remove from the directory listing.

    Returns IndexInode

    Returns the item removed, or null if the item did not exist.

Generated using TypeDoc