A file in a WNFS public file system.

Constructors

  • Creates a new file in a WNFS public file system.

    Parameters

    • time: Date

    Returns PublicFile

Methods

  • Converts this directory to a node.

    Returns PublicNode

  • Returns void

  • Gets the entire content of a file.

    Parameters

    Returns Promise<any>

  • Gets a unique id for node.

    Returns string

  • Gets the content cid of the file.

    Parameters

    Returns Promise<any>

  • Gets the exact content size without fetching all content blocks.

    Parameters

    Returns Promise<any>

  • Gets the metadata of this file.

    Returns any

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

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

    Returns Uint8Array[]

  • Gets the content of the file at given offset & with an optional byte limit.

    Parameters

    • byte_offset: number
    • limit: undefined | number
    • store: BlockStore

    Returns Promise<any>

  • Sets the content of a file to a byte array.

    Parameters

    Returns Promise<any>

  • Stores a file in provided block store.

    Parameters

    Returns Promise<any>

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

    Parameters

    Returns Promise<any>

Generated using TypeDoc