In Local the answer is yes.
The generalized entity retains the objects that it got. Specialization FileDocument entries removed. In the filesystem - contents binary files are removed but the folders which may are created to organize files are kept.
FYI, this is the response from Mendix Support:
Current Behavior: In Mendix Cloud, file contents are retained even after deleting references, due to the com.mendix.storage.PerformDeleteFromStorage
setting being set to false. This allows for database restoration to an older version.
Planned Change: R&D aims to update this behavior by the end of the quarter, allowing for file deletion when no longer referenced in the active database or backups.
Pedro,
When we needed to do something similar (remove file contents but retain the entity and associations) I created this microflow:
The Java action does this
Which replaces the existing file contents with a simple string. We also added an attribute to our file document specialization which indicates that the file contents have been removed:
Hope that gives you some ideas as you are working on this.
Mike