Search code examples
grailsgroovy

How to get base project directory name in grails?


I want to get project folder but not work. Please kindly help!

Example:

 println grailsApplication.getBaseDir()

Solution

  • Use the following code to get the base directory --

    File file = grails.util.BuildSettings.BASE_DIR