[Gambas-user] Newbie question

Bodard Fabien gambasfr at ...11...
Tue Sep 21 00:16:33 CEST 2004


Le mardi 21 Septembre 2004 01:45, Charlie Reinl a écrit :
> >This code work perfectly:
> >
> >PUBLIC SUB Button3_Click()
> >           TextArea1.Text=File.Load("error.txt")
> >END
> >
> >If file 'error.txt' not exist?
> >How to check the existence of the file?
> >
> >Thank ;-)
>
> use  DIR / isDir (see isDir/Dir  in help)
> * Gesendet mit / Sent by: FEN-Webmail * http://www.fen-net.de *

Hello ... 
Use :;

IF Exist("myfile") THEN ...

isDir is to know is the path is a directory

Dir ("mypath", "mypattern") return an array of files contained in the path


Fabien Bodard

>
> -------------------------------------------------------
> This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
> Project Admins to receive an Apple iPod Mini FREE for your judgement on
> who ports your project to Linux PPC the best. Sponsored by IBM.
> Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user




More information about the User mailing list