Wow, that is a good question! I can't find anything in any documentation and I could not figure it out. I could insert a new file component with NewSeriesObject(), but could not convert it to a folder or group. It seems like ComponentType() is read-only. Maybe somebody else happens to know.
Russ