I am trying to create a copy of a layer already on the map. It works great when I hardcode the file extension or the layer is in a gdb. The problem is that I won't know that when the user clicks copy. How do I programmatically find out the file extension? I know that it is stored since I can see it when I go to the layer properties in ArcPro, but I can't figure out how to see that programmatically.