rmapi-js
    Preparing search index...

    Class FolderContent

    a folder's .content: its tags

    Hierarchy (View Summary)

    Index
    • get hasEdits(): boolean

      whether an edit changes the file from the version as read

      Returns boolean

    • tag the folder

      Parameters

      • name: string

      Returns this

    • every key the core does not read

      Returns Record<string, Json>

    • remove a key of the file: a key the core reads clears its field, or sets it to what a file without the key reads it as

      Parameters

      • key: string

      Returns this

      Warning: as for setExtra, this can leave the file at odds with itself. Prefer the field's own setter.

      ValidationError if key names a field the file must have; the file is left as it was

    • untag the folder

      Parameters

      • name: string

      Returns this

    • set a key of the file: a key the core reads sets its field, and any other is kept in extra

      Parameters

      • key: string
      • value: Json

      Returns this

      Warning: a key the core reads is written as given, past the rules its own setter keeps, so it can leave the file at odds with itself, such as a pageCount that does not count the pages listed. Prefer the field's own setter, such as setPages for the page keys.

      ValidationError if value is not a value of the field key names; the file is left as it was

    • set the tags, with when each was added, or remove them, written as DocumentContent.setTags writes them

      Parameters

      • tags: Tag[] | undefined

      Returns this

      Warning: a merge orders tags by when they were added, so a tag dated earlier than a copy elsewhere removed it stays removed. Prefer addTag and removeTag, which date the edit now.

    • the file with its edits made, as the account holds it

      Returns Uint8Array

    • the file with its edits made, as JSON

      Returns Record<string, Json>

    • read a folder's .content from what toJSON gave, or a copy of it, as read from the account at at; the core checks every field

      Parameters

      • value: unknown
      • at: Date = ...

      Returns FolderContent

      TypeError if value is not an object

    • read a folder's .content from its bytes, read from the account at at

      Parameters

      • bytes: Uint8Array
      • at: Date = ...

      Returns FolderContent