code: public File layoutOnDisk() {
      try {
        File profileDir = TemporaryFilesystem.getDefaultTmpFS()
            .createTempDir("anonymous", "webdriver-profile");
        File userPrefs = new File(profileDir, "user.js");
  
        copyModel(model, profileDir);
        installExtensions(profileDir);
        deleteLockFiles(profileDir);
        deleteExtensionsCacheIfItExists(profileDir);
        updateUserPrefs(userPrefs);
        return profileDir;
      } catch (IOException e) {
        throw new UnableToCreateProfileException(e);
      }
    }
docs: Call this to cause the current profile to be written to disk. The profile directory is
  returned. Note that this profile directory is a temporary one and will be deleted when the JVM
  exists (at the latest)
  
  This method should be called immediately before starting to use the profile and should only be
  called once per instance of the {@link org.openqa.selenium.firefox.FirefoxDriver}.
  
  @return The directory containing the profile.