Skip to main content

  | मौसम…

411 समाचार
Public archive edition · Attributed source reporting with original dates · AI drafts are excluded

411 REFERENCE · Wikibooks

Gambas/Exist

Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.

back to Gambas Does a File or Directory exist ? Example: PUBLIC SUB Button1_Click() IF Exist("/bin/bash") = TRUE THEN Label1.Text="OK i found Bash" END IF IF Exist("/bin/bash") = FALSE THEN Label1.Text="Error Bash is missing" END IF END Get system's root / home folder ? Example : 'Created : Cijo Jose 'E-mail : info.cijo@gmail.com 'Job ID : Junior Software Engineer PUBLIC SUB Button1_Click() dir_name as string dir_name = system.root ' Will return root folder print dir_name dir_name = system.home ' Will return home folder print dir_name END When you click on your button your gambas program checks for Bash if Bash is found then Label1 displays "OK i found Bash" if Bash is not found then Label1 displays "Error Bash is missing" Gambas.SteveStarr - 02 Aug 2005