List and search
client.folders, a Folders, finds a locator before you open it. Listing a folder opens its folder index, like an open of an object. It gets one decision and one access event. Search opens every folder index in scope and searches the decrypted contents on the device. A query never leaves the device.
List a folder
The samples use the allowed helper from Access decisions.
const listing = await allowed(await client.folders.list(folder));if (listing) render(listing.entries);if let listing = try await allowed(client.folders.list(folder)) { render(listing.entries) }allowed(client.folders.list(folder))?.let { render(it.entries) }A Listing names the dataset it belongs to, the key domain that governs it, the folder you asked for and its entries. Each Entry is a record, a file or a sub-folder. It carries:
| Field | What it holds |
|---|---|
locator | The object’s identifier. |
kind | record, file, or folder. |
name, type | From the current version’s own data. Only a device that may open the index sees a name. |
times | When it was created and last saved. |
currentVersion | The current version number, absent for a plain folder. |
versions | Every VersionInfo: its version, savedAt, writer, baseVersion, whether it is pending, and whether it is retired into the recycle bin. |
indexFields | The dataset’s index fields, as the Client that saved the version wrote them. |
recipients | The record’s own recipients. The next save keeps their access too. |
domainRoot | Set when this entry is itself the root of a sub-domain. |
Search across datasets
folders.search takes a SearchQuery, a scope of one or more datasets, and returns a SearchResult. The query runs over names and index fields, entirely on the device, once the Seald Healthcare Cloud has answered the decision for each folder index.
const found = await client.folders.search( { text: 'MR', indexFields: { modality: 'MR' }, kind: 'file', savedFrom: from, savedTo: to }, { datasets: ['imaging'] },);render(found.entries);let found = try await client.folders.search( SearchQuery(text: "MR", indexFields: ["modality": "MR"], kind: .file, savedFrom: from, savedTo: to), datasets: ["imaging"],)render(found.entries)val found = client.folders.search( SearchQuery(text = "MR", indexFields = mapOf("modality" to "MR"), kind = ObjectKind.FILE, savedFrom = from, savedTo = to), datasets = listOf("imaging"),)render(found.entries)Every SearchQuery field is optional:
textmatches free text in names and index fields.indexFieldsmatches the exact value of one or more index fields.kindlimits the search to records or files.savedFromandsavedTobound the save date.
SearchResult carries entries. Each entry adds the dataset, domain and folder it was found in. SearchResult also carries indexes, one decision per folder index opened. A denied index appears there with no entries. It does not vanish from the results without explanation.
What the SDK does for you
- Opens the folder index the same way it opens any object: checked, decrypted, and closed when done.
- Keeps listings consistent. A listing never shows a save that only partly completed.
- Searches decrypted indexes on the device. The Seald Healthcare Cloud never sees a query’s text or field values.
- Records one Query Records access event per index opened. The access event names the indexes, never the query.
Decisions and errors you may see
Outcome or ErrorCode | When | What to do |
|---|---|---|
deny on folders.list | The policies refuse the folder index itself. | Show text. Nothing in the folder is listed. |
deny inside SearchResult.indexes | The policies refused one folder index in scope. | That index’s entries are absent. The rest of the result still renders. |
storage-unreachable | The SDK could not fetch the folder index. | Retry once storage is back. |
Next
- Open records and files once you have a locator.
- Share for who can see an entry’s
recipients. - Datasets for how
indexFieldsare configured. - Owners and sub-domains for what a
domainRootentry means.