add file to the batch
OtherClientError if file was read through another
client, FileTwiceError if the batch holds a copy of it, and
PutRunningError while a push or pull of it runs; the batch is then as it
was
add every file of files to the batch
as add does, for the first file refused;
the batch is then as it was before the call
read the account's copy of every file from one read of the root, and merge each file's edits onto it, to hold with its item's reference as the account lists it now; it writes nothing
NotFoundError if the account no longer lists an item, and
a merge error as push does; a failed pull leaves
every file and its reference as it was
write the edits of every file in one root write, all or none
Each file must still be the one the account lists for its item. Each item
written has its .metadata dated now, unless an edit of it in the batch
set its date. A page, its layer names and its highlights may be of a page
a .content in the batch adds. Once written, each file holds its item's
new reference and what was written. A file with no edits writes nothing
and is not checked: if the account's copy of it changed, it stays as it
was. When the account's copy of a file with edits changed, onConflict
says whether to fail, or to merge the edits onto the newer copy of each
such file and write them all again.
NotFoundError if the account no longer lists an item,
HashChangedError with the first such item if a file changed and
onConflict is "fail" or the merges ran out, PageNotFoundError
if a document does not list a page whose file was to be written, and
ContentMergeError or MergeError if a merge failed; a
failed push writes nothing and leaves every file and its reference as it
was. Until this settles, an edit, a push or a pull of any file throws a
PutRunningError.
files read through one client, of any items, to push or pull together
addandextendrefuse a file read through another client and a second copy of a file, when it is added.pushwrites every file's edits in one root write, all or none, andpullmerges every file's edits onto the account's copy from one read of the root. A batch is pushed or pulled once. A client'spushAllandpullAllare shorthand for a batch of a list of files.Example