You have to save the layer(s) to disk.
Create a new document like the current one, copy the layers over, and Save As...
I am not sure what setting layers to disk means.
What I am hoping to do is to list the file layers and layer groups by name with MB size.
Can this be achieved with a script?
There is no way of determining the size of a layer without saving it to disk as I described above.
The files are saved to disk already. I am able to get the entire file size. However, I would also like to find out the size of the individual layers and layer groups.
Is it possible?