Class FileSystem

Hierarchy

  • FileSystem

Implements

Constructors

Properties

_publishWhenOnline: [CID<unknown, number, number, Version>, Ucan][]
_publishing: false | [CID<unknown, number, number, Version>, true]
dependencies: Dependencies
eventEmitter: EventEmitter<FileSystem>
localOnly: boolean
proofs: {
    [_: string]: Ucan;
}

Type declaration

publishHooks: PublishHook[]
root: default

Methods

  • Internal

    Parameters

    • e: Event

    Returns string | void

  • Accept a share. Copies the links to the items into your 'Shared with me' directory. eg. private/Shared with me/Sharer/

    Parameters

    • __namedParameters: {
          shareId: string;
          sharedBy: string;
      }
      • shareId: string
      • sharedBy: string

    Returns Promise<FileSystem>

  • Deactivate a file system.

    Use this when a user signs out. The only function of this is to stop listing to online/offline events.

    Returns void

  • Ensures the current version of your file system is "committed" and stepped forward, so the current version will always be persisted as an "step" in the history of the file system.

    This function is implicitly called every time your file system changes are synced, so in most cases calling this is handled for you.

    Returns Promise<void>

  • Loads a share. Returns a "entry index", in other words, a private tree with symlinks (soft links) to the shared items.

    Parameters

    • __namedParameters: {
          shareId: string;
          sharedBy: string;
      }
      • shareId: string
      • sharedBy: string

    Returns Promise<UnixTree>

  • Ensures the latest version of the file system is added to IPFS, updates your data root, and returns the root CID.

    Returns Promise<CID<unknown, number, number, Version>>

  • Resolve a symlink directly. The get and cat methods will automatically resolve symlinks, but sometimes when working with symlinks directly you might want to use this method instead.

    Parameters

    Returns Promise<null | File | Tree>

  • Share a private file with a user.

    Parameters

    • paths: Distinctive<[Private, string, ...string[]]>[]
    • __namedParameters: {
          shareWith: string | string[];
          sharedBy?: SharedBy;
      }
      • shareWith: string | string[]
      • Optional sharedBy?: SharedBy

    Returns Promise<ShareDetails>

Generated using TypeDoc