[Gambas-user] Creating a directory

Fabien Bodard abidoo.too at ...11...
Sat Jun 5 19:53:44 CEST 2004


Le lundi 31 Mai 2004 14:43, Grahame White a écrit :
> On Monday 31 May 2004 12:56, Benoit Minisini wrote:
> > On Monday 31 May 2004 13:48, Grahame White wrote:
> > > Currently I have a section of code something like this
> > >
> > > dim path as string
> > >
> > > path = "/home/" & application.user & "/.gbdir"
> > >
> > > if exist(path) then
> > > 	' do stuff
> > > else
> > > 	mkdir path
> > > endif


hep Grahame... This is a tips...

Gambas have a little pretty magic  key : '&/'  who put the separator if not 
exist !
And a function named Appliaction.Home who is the user directory so you must to 
do :

Path = Application.home &/ ".gbdir"

It's more shorty no ?

And the user is not necessary the same as the path... 

Regards,
Fabien Bodard

>
> Grahame
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: Oracle 10g
> Get certified on the hottest thing ever to hit the market... Oracle 10g.
> Take an Oracle 10g class now, and we'll give you the exam FREE.
> http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
> _______________________________________________
> 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