This issue is quite old, the only way I know is to overwrite it with a single space-character by use of community commmons StringToFile.
To delete the "content of the file", you can simply delete the object itself.
It will be removed from the Mendix file system automatically (local environment <appdir>\deployment\data\files in one of the subfolders)