How to detect that the cache disk is full?

When the cache disk is full, PS cannot run, so I want to detect whether it is full to remind users to clean up the cache disk.

UXP does not have access to the list of volumes on the user’s machine, nor the amount of space remaining. There’s no support for this at the moment.