Mimic "Ctrl + D" (duplicate) functionality on a prefab in "Project" view

As the title suggests, is there a way to programmatically imitate the duplicate functionality for prefabs in the “Project” view? I’m able to do it in “OnPostProcessModel” if I bring a new asset into the view, but I’m trying to put the same functionality into an editor button and running into issues.

You want to duplicate an asset?!
You can execute the menu button: Unity - Scripting API: EditorApplication.ExecuteMenuItem
or you can create the asset yourself: Unity - Scripting API: AssetDatabase

Both of those are very useful, thanks a bunch. Although funny enough, I managed to write some code that does exactly what AssetDatabase.CopyAsset does haha.