A directory in a WNFS public file system.

Constructors

  • Creates a new directory using the given metadata.

    Parameters

    • time: Date

    Returns PublicDirectory

Methods

  • Converts directory to a node.

    Returns PublicNode

  • Moves a specified path to a new location.

    Parameters

    • path_segments_from: any[]
    • path_segments_to: any[]
    • time: Date
    • store: BlockStore

    Returns Promise<any>

  • Copies a specific node to another location.

    Parameters

    • path_segments_from: any[]
    • path_segments_to: any[]
    • time: Date
    • store: BlockStore

    Returns Promise<any>

  • Returns void

  • Gets a unique id for node.

    Returns string

  • Follows a path and fetches the node at the end of the path.

    Parameters

    Returns Promise<any>

  • Looks up a node by its path name in the current directory.

    Parameters

    Returns Promise<any>

  • Returns names and metadata of the direct children of a directory.

    Parameters

    Returns Promise<any>

  • Gets the metadata of the directory

    Returns any

  • Creates a new directory at the specified path.

    This method acts like mkdir -p in Unix because it creates intermediate directories if they do not exist.

    Parameters

    Returns Promise<any>

  • Gets the previous CID(s) of the directory. This will usually be an array of a single CID, but may be

    • an empty array, if this is the first revision of a directory
    • an array with multiple elements if this is the merge node of multiple concurrent changes to the directory.

    Returns Uint8Array[]

  • Reads specified file content from the directory.

    Parameters

    Returns Promise<any>

  • Removes a file or directory from the directory.

    Parameters

    Returns Promise<any>

  • Stores directory in provided block store.

    Parameters

    Returns Promise<any>

  • Writes a file to the directory.

    Parameters

    • path_segments: any[]
    • content: Uint8Array
    • time: Date
    • store: BlockStore

    Returns Promise<any>

  • Loads a directory given its CID from the block store.

    Parameters

    Returns Promise<any>

Generated using TypeDoc