Private
clientReadonly
roomReadonly
roomSyntactic sugar for room ID of the Space.
Whether or not this is a top level space.
Creates a directory under this tree space, represented as another tree space.
The name for the directory.
Promise which resolves to the created directory.
Creates (uploads) a new file to this tree. The file must have already been encrypted for the room. The file contents are in a type that is compatible with MatrixClient.uploadContent().
The name of the file.
The encrypted contents.
The encrypted file information.
Optional
additionalContent: IContentOptional event content fields to include in the message.
Promise which resolves to the file event's sent response.
Gets a list of all known immediate subdirectories to this tree space.
The tree spaces (directories). May be empty, but not null.
Gets a subdirectory of a given ID under this tree space. Note that this will not recurse into children and instead only look one level deep.
The room ID (directory ID) to find.
The directory, or undefined if not found.
Retrieves a file from the tree.
The event ID of the file.
The file, or null if not found.
Private
getPrivate
getGets the current permissions of a user. Note that any users missing explicit permissions (or not in the space) will be considered Viewers. Appropriate membership checks need to be performed elsewhere.
The user ID to check permissions of.
The permissions for the user, defaulting to Viewer.
Invites a user to the tree space. They will be given the default Viewer permission level unless specified elsewhere.
The user ID to invite.
True (default) to invite the user to all directories/subspaces too, recursively.
True (default) to share encryption keys with the invited user. This will allow them to decrypt the events (files) in the tree. Keys will not be shared if the room is lacking appropriate history visibility (by default, history visibility is "shared" in trees, which is an appropriate visibility for these purposes).
Promise which resolves when complete.
Gets an array of all known files for the tree, including inactive/invalid ones.
The known files. May be empty, but not null.
Gets an array of all known files for the tree.
The known files. May be empty, but not null.
Private
retrySets the order index for this directory within its parent. Note that if this is a top level space then an error will be thrown. -1 can be used to move the child to the start, and numbers larger than the number of children can be used to move the child to the end.
The new order index for this space.
Promise which resolves when complete.
Throws if this is a top level space.
Sets the permissions of a user to the given role. Note that if setting a user to Owner then they will NOT be able to be demoted. If the user does not have permission to change the power level of the target, an error will be thrown.
The user ID to change the role of.
The role to assign.
Promise which resolves when complete.
Generated using TypeDoc
Represents a MSC3089 file tree Space. Note that this is UNSTABLE and subject to breaking changes without notice.