views:

37

answers:

1

Hi,

I tried from a controller to use grailsApplication information to create some folder, however,

what I got from the following line of code is "false" - my grails application runs well, though....

File(grailsApplication.config.images.location.toString()).mkdirs()

could some one help, please?

thanks.

edit: thank you leebutts for your quick answer. my embarassment is that I always get ${grailsApplication.config.images.location.toString()} as null. But my grails application works very well.....please excuse me if this question seems too naive for the experienced grails experts because i'm really new to the wonderful technology....

A: 

Does that directory already exist?

mkdirs() returns true only if it creates the directory.

cheers

Lee

leebutts
thank you for your answer. and you are right. however, even grailsApplication.config.images.location.toString()) is [], which means that mkdirs() gets false because the former is null....
john
Can you post your config.groovy where you set the location?
leebutts