When gulp compiles and packages with watch, how to tell that a folder in dist is empty?

how can gulp tell that a folder in dist is empty when it is compiled and packaged with watch, which means that all the files in this folder have been deleted, but I can"t tell that the folder in dist is empty, so I can"t delete the empty folder

Sep.21,2021
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b386a9-2c118.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b386a9-2c118.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?