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.
Resolves to the created directory.
The name for the 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().
Resolves to the file event's sent response.
The name of the file.
The encrypted contents.
The encrypted file information.
Optional
additionalContent: IContentOptional event content fields to include in the message.
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 directory, or undefined if not found.
The room ID (directory ID) to find.
Retrieves a file from the tree.
The file, or null if not found.
The event ID of the file.
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 permissions for the user, defaulting to Viewer.
The user ID to check permissions of.
Invites a user to the tree space. They will be given the default Viewer permission level unless specified elsewhere.
Resolves when complete.
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).
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.
Resolves when complete.
Throws if this is a top level space.
The new order index for this 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.
Resolves when complete.
The user ID to change the role of.
The role to assign.
Generated using TypeDoc
Represents a MSC3089 file tree Space. Note that this is UNSTABLE and subject to breaking changes without notice.