FEditorFileUtils::SaveDirtyContentPackages

Looks at all currently loaded packages and saves them if their "bDirty" flag is set and they include specified clasees, optionally prompting the user to select which packages to save)