downloadBriefcase MethodStatic

Download a new briefcase from iModelHub for the supplied iModelId.

Briefcases are local files holding a copy of an iModel. Briefcases may either be specific to an individual user (so that it can be modified to create changesets), or it can be readonly so it can accept but not create changesets. Every briefcase internally holds its BriefcaseId. Writeable briefcases have a BriefcaseId "assigned" to them by iModelHub. No two users will ever have the same BriefcaseId. Readonly briefcases are "unassigned" with the special value Unassigned.

Typically a given user will have only one briefcase on their machine for a given iModelId. Rarely, it may be necessary to use more than one briefcase to make isolated independent sets of changes, but that is exceedingly complicated and rare.

Callers of this method may supply a BriefcaseId, or if none is supplied, a new one is acquired from iModelHub.

downloadBriefcase(arg: RequestNewBriefcaseArg): Promise<LocalBriefcaseProps>

note The location of the local file to hold the briefcase is arbitrary and may be any valid local path on your machine. If you don't supply a filename, the local briefcase cache is used by creating a file with the briefcaseId as its name in the briefcases folder below the folder named for the IModelId.

note It is invalid to edit briefcases on a shared network drive and that is a sure way to corrupt your briefcase (see https://www.sqlite.org/howtocorrupt.html)

Parameter Type Description
arg RequestNewBriefcaseArg The arguments that specify the briefcase file to be downloaded.

Returns - Promise<LocalBriefcaseProps>

The properties of the local briefcase in a Promise that is resolved after the briefcase is fully downloaded and the briefcase file is ready for use via BriefcaseDb.open.

Defined in

Last Updated: 20 June, 2023