UNPKG

806 BTypeScriptView Raw
1import FileSystem from './fs/index';
2import { Maybe } from './common/index';
3import { Permissions } from './ucan/permissions';
4/**
5 * Load a user's file system.
6 *
7 * @param permissions The permissions from initialise.
8 * Pass `null` if working without permissions
9 * @param username Optional, username of the user to load the file system from.
10 * Will try to load the file system of the authenticated user
11 * by default. Throws an error if there's no authenticated user.
12 * @param rootKey Optional, AES key to be the root key of a new filesystem.
13 * Will be used if a filesystem hasn't been created yet.
14 */
15export declare function loadFileSystem(permissions: Maybe<Permissions>, username?: string, rootKey?: string): Promise<FileSystem>;