开发者

cannot access grailsApplication.config.images.location.toString())

开发者 https://www.devze.com 2023-01-01 13:17 出处:网络
I triedfrom 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....

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 alway开发者_运维知识库s 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....


Does that directory already exist?

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

cheers

Lee

0

精彩评论

暂无评论...
验证码 换一张
取 消