I want to remove Copy, Duplicate operation from document browser\'s context menu action
In my code for class FileProviderItem
modify property cap
Just to also post what I said to you in the comments, this behavior is defined by the file provider extension UI. When adding the file provider extension to the application, it adds two targets in your apps targets. If you don't want this type of functionality, then simply just remove the file provider extension UI target from your project.
Here's an excerpt from Apple on the File Provider Extension UI:
Use the File Provider UI extension to add custom actions to your File Provider extension. These actions appear if the user long presses an item while browsing your file provider's content. When the user selects your action, the system displays your custom user interface, where the user completes the action. After the user is finished, you must explicitly cancel or complete the action.
https://developer.apple.com/documentation/fileproviderui