Figma plugin check current file size

Is it any figma function to get the file size at a given moment in time?

This question comes related to the fact that I would like to check, by plugin code, the size of the current figma file before and after detaching some components.


To see the file size of a figma file:
Open the respective figma file. There go to,
Left top Figma Icon (or main menu) > View > Resource use.


This is a fantastic tip. Thank you. I had no clue this existed natively in Figma and really needed to discover what is bloating the size of our files.