BriefcaseManager Class

Manages downloading Briefcases and downloading and uploading changesets.

Methods

Name Description
constructor(): BriefcaseManager    
acquireNewBriefcaseId(arg: AcquireNewBriefcaseIdArg): Promise<number> Static Acquire a new briefcaseId from iModelHub for the supplied iModelId  
deleteBriefcaseFiles(filePath: string, accessToken?: string): Promise<void> Static Delete and clean up a briefcase and all of its associated files.  
downloadBriefcase(arg: RequestNewBriefcaseArg): Promise<LocalBriefcaseProps> Static Download a new briefcase from iModelHub for the supplied iModelId.  
getBriefcaseBasePath(iModelId: string): string Static Get the local path of the folder storing briefcases associated with the specified iModel.  
getCachedBriefcases(iModelId?: string): LocalBriefcaseProps[] Static Get a list of the local briefcase held in the briefcase cache, optionally for a single iModelId  
getFileName(briefcase: BriefcaseProps): string Static Get the name of the local file that holds, or will hold, a local briefcase in the briefcase cache.  
getIModelPath(iModelId: string): string Static Get the local path of the folder storing files that are associated with an imodel  
getLatestChangeset(arg: { iModelId: string }): Promise<ChangesetProps> Static Query the hub for the ChangesetProps of the most recent changeset  
initialize(cacheRootDir: string): void Static Initialize BriefcaseManager  
isValidBriefcaseId(id: number): boolean Static Determine whether the supplied briefcaseId is in the range of assigned BriefcaseIds issued by iModelHub  
queryChangeset(arg: { changeset: ChangesetIndexOrId, iModelId: string }): Promise<ChangesetProps> Static Query the hub for the properties for a ChangesetIndex or ChangesetId  
queryChangesets(arg: { iModelId: string, range: ChangesetRange }): Promise<ChangesetProps[]> Static Query the hub for an array of changeset properties given a ChangesetRange  
queryIModelByName(arg: IModelNameArg): Promise<undefined | string> Static Query the Id of an iModel by name.  
releaseBriefcase(accessToken: string, briefcase: BriefcaseProps): Promise<void> Static Releases a briefcaseId from iModelHub.  

Properties

Name Type Description
cacheDir Accessor StaticReadOnly string Get the root directory for the briefcase cache  

Defined in

Last Updated: 28 March, 2024