the size of all its files, as the account reports it
the tags as the account last listed them, without the edits not yet sent
the kinds of body it has, the epub first and then the pdf, as the account lists them, whatever order its files are in
the hash the account lists it at, or undefined if no fetch has seen it
the id, which finds the item again
the format of the document
the place in the page order of the page the reader was last on, counting from zero
when it was last renamed or read
the name shown on the device
whether it is an epub the tablet never laid out, which lists no page ids
until setPageCount gives it some
the number of pages pages gives, with the
edits not yet sent
whether it is starred
the tags, with the edits not yet sent; the account's own are accountTags
where following its parents up ends
whether the last sync could not read it as the account holds it, so it
shows as it was last read, or, never read, with only what its .metadata
and file list give; an app should show it with a warning
its .content as the account last listed it, if it has one
add a blank page at position, and return it
It edits cPages when the document has it, and else the pages list,
where the page added maps to no page in redirectionPageMap; a document
with neither throws a ContentEditError until
setPages gives it ids.
add the tag name, unless it has it, and return it as it is now
every file of it zipped, with the edits not yet sent, as
Client.documentArchive zips the account's; a file it does not edit,
such as the body, is fetched if the store does not hold it
the zip archive makes, as a stream that
fetches and zips a file at a time as it is read, so no more than about
one file is held at once; it errors as archive throws
its .content with the edits not yet sent
the file named name in its index, such as <id>.content, if the account lists it
the files the account lists for it
give an epub that lists no page ids count of them, as
setPageCount does, unless it
needs none, and return it as it is now
the page the reader was last on, if the document lists it
the size of its files the store holds, in bytes
move it, including into and out of the trash, and return it as it is now
the page id, if the document lists it
its pages, in page order; a pdf or epub that lists no page ids has one page with no id for each page of its file
where it sits
purge it for good; what is inside a folder stays and becomes stray
purge it and everything inside it, returning the ids queued to purge
rename it, and return it as it is now
move it out of the trash to the root, and return it as it is now
move it out of the trash into folder, and return it as it is now
set one field of its .content, and return it as it is now
set the page the reader was last on by its index, and return it as it is now
An epub with no pdf and no cPages that lists index page ids or fewer
first gets ids up to that page, as
setPageCount gives them, keeping those
it lists, as the reMarkable Mac app does, since the tablet ignores a page
past the ids listed.
ContentEditError as setPageCount does
set an epub's page ids to count, keeping the ids it lists in order,
dropping those past count, and adding new ones after, as
setPages sets them, and return it as it is
now
The page count of an epub is a layout the device works out, so this lets a reader that laid it out itself give it ids. A sync whose account copy another device gave ids keeps those and adds to or drops from them.
ContentEditError with reason "hasPdf" if the document
has a pdf, "notEpub" if it is not an epub, or "hasPageList" if it has
cPages
set the page ids of a document without cPages, as the reMarkable Mac
app does on opening a document the tablet never laid out, and return it
as it is now
As DocumentContent.setPages does:
pages becomes the pages list, redirectionPageMap becomes 0..n, and
pageCount and originalPageCount become n. The page edits, such as
addPage, can then be made.
ContentEditError with reason "hasPageList" if the
document has cPages, or "duplicatePage" if pages lists an id twice
star or unstar it, and return it as it is now
fetch its body into the store, if it is not there, reporting its progress as it arrives, or once at its whole size if the store holds it
Optionalkind: BodyKindfetch each file the account lists for it into the platform's store, unless it holds it, so it reads offline; throws for the first that failed
move it to the trash, and return it as it is now
a document of the library, as it was when handed out
An edit returns it as it is after; one of an item purged since throws a
NotHeldError.