The SaveItemDialog returns the selected item as a string. Is there a way to determine which type of datastore was selected?
I now try to make a guess based on Path.GetDirectoryName(saveDialog.FilePath), e.g.
- If the path is a directory, and has a .gdb extension, it's a file geodatabase
- If the path is a directory, and does not have .gdb extension, it's a shapefile folder
- If the path is a file, and has a .sde extension, it's an enterprise geodatabase
- If the path is a file, and does not have a .sde extension, it's an SQLite database
- ...
So far this works, but it feels like there should be an easier, more generic way