@peardrive/cli
    Preparing search index...

    Class GlobalState

    Global state

    Index

    Constructors

    Properties

    createNewPearDriveArgs: {}

    Argument object for creating a new PearDrive

    localFiles: any[]

    Temp storage for local files of a PearDrive instance

    nonlocalFiles: any[]

    Temp storage for nonlocal files of a PearDrive instance

    pearDrives: any[]

    List of running PearDrive instances

    Accessors

    Methods

    • Add a PearDrive instance to the pearDrives array

      Parameters

      • pearDrive: PearDrive

        PearDrive instance to add

      Returns number

      • Index of the added PearDrive in pearDrives array
    • Retrieve a PearDrive instance based on given network key

      Parameters

      • key: any

      Returns number

      • Index of the PearDrive in pearDrives array, or -1 if not found
    • Get the index of a pearDrive from a given seed

      Parameters

      • seed: string

        The seed of the PearDrive to find

      Returns number

      • Index of the PearDrive in pearDrives array, or -1 if not found
    • Get the currently selected PearDrive instance

      Returns PearDrive

      • PearDrive instance with given network key
    • Remove a PearDrive instance with given network key from the pearDrives array

      Parameters

      • index: number

        Index of PearDrive to remove

      Returns void