src/vs/workbench/services/userDataProfile/browser/userDataProfileManagement.ts/UserDataProfileManagementService/createAndEnterProfile
class UserDataProfileManagementService:	async createAndEnterProfile(name: string, useDefaultFlags?: UseDefaultProfileFlags, fromExisting?: boolean): Promise<IUserDataProfile> {
		const workspaceIdentifier = this.getWorkspaceIdentifier();
		const promises: Promise<any>[] = [];
		const newProfile = this.userDataProfilesService.newProfile(name, useDefaultFlags);
		await this.fileService.createFolder(newProfile.location);
		const extensionsProfileResourcePromise = this.checkAndCreateExtensionsProfileResource();
		promises.push(extensionsProfileResourcePromise);
		if (fromExisting) {
			// Storage copy is handled by storage service while entering profile
			promises.push(this.fileService.copy(this.userDataProfileService.currentProfile.settingsResource, newProfile.settingsResource));
			promises.push((async () => this.fileService.copy(await extensionsProfileResourcePromise, newProfile.extensionsResource))());
			promises.push(this.fileService.copy(this.userDataProfileService.currentProfile.keybindingsResource, newProfile.keybindingsResource));
			promises.push(this.fileService.copy(this.userDataProfileService.currentProfile.tasksResource, newProfile.tasksResource));
			promises.push(this.fileService.copy(this.userDataProfileService.currentProfile.snippetsHome, newProfile.snippetsHome));
		}
		await Promise.allSettled(promises);
		const createdProfile = await this.userDataProfilesService.createProfile(newProfile, workspaceIdentifier);
		await this.enterProfile(createdProfile, !!fromExisting);
		return createdProfile;
	}