[Gambas-user] cleaning gambas.1000 dir

Bruce Steers bsteers4 at gmail.com
Sun Nov 19 23:31:47 CET 2023


Do you think it is a bad idea to clean the /tmp/gambas100/ dir ?

I added this code to my Gambas3 startup....

  Dim sDir As String = File.Dir(File.Dir(Temp()))
  For Each s As String In Dir(sDir, "*", gb.Directory)
    If s Match "^[0-9]+$" Then
     If Not Exist("/proc" &/ s) Then Exec ["rm", "-rf", sDir &/ s]
    Endif
  Next

So all folders in gambas.1000 that are just a number are matched to folders
in /proc/
if the /proc/ folder does not exist the gambas folder is also deleted.

That shouldn't break anything right?

Respects
BruceS
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20231119/8e10d030/attachment.htm>


More information about the User mailing list