ResourceUtils (Grails 3.2.9)
Date: 2017-04-26

Package: grails.io

## [Groovy] Class ResourceUtils

- grails.io.ResourceUtils

- Utility methods for interacting with resources

  Authors:
    Graeme Rocher
  Since:
    3.0

- - Inherited fields
    Fields inherited from class | Fields
    --- | ---
    `class GrailsResourceUtils` | `CLASSPATH_URL_PREFIX, CLASS_EXTENSION, COMPILER_ROOT_PATTERNS, DOMAIN_DIR_PATH, DOMAIN_PATH_PATTERN, FILE_URL_PREFIX, GRAILS_APP_DIR, GRAILS_RESOURCE_PATTERN_EIGHTH_MATCH, GRAILS_RESOURCE_PATTERN_ELEVENTH_MATCH, GRAILS_RESOURCE_PATTERN_FIFTH_MATCH, GRAILS_RESOURCE_PATTERN_FIRST_MATCH, GRAILS_RESOURCE_PATTERN_FOURTH_MATCH, GRAILS_RESOURCE_PATTERN_NINTH_MATCH, GRAILS_RESOURCE_PATTERN_SECOND_MATCH, GRAILS_RESOURCE_PATTERN_SEVENTH_MATCH, GRAILS_RESOURCE_PATTERN_SIXTH_MATCH, GRAILS_RESOURCE_PATTERN_TENTH_MATCH, GRAILS_RESOURCE_PATTERN_THIRD_MATCH, JAR_URL_SEPARATOR, REGEX_FILE_SEPARATOR, RESOURCE_PATH_PATTERN, SPRING_SCRIPTS_PATH_PATTERN, URL_PROTOCOL_CODE_SOURCE, URL_PROTOCOL_FILE, URL_PROTOCOL_JAR, URL_PROTOCOL_VFS, URL_PROTOCOL_VFSZIP, URL_PROTOCOL_WSJAR, URL_PROTOCOL_ZIP, VIEWS_DIR_PATH, VIEWS_DIR_PATH_NO_SLASH, WEB_APP_DIR, WEB_INF, grailsAppResourcePatterns, patterns`

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `static java.lang.Iterable<java.lang.String>` | `getProjectPackageNames()` Obtains the package names for the project.
    `` | `static java.lang.Iterable<java.lang.String>` | `getProjectPackageNames(java.io.File baseDir)`
    `` | `protected static java.lang.Object` | `populatePackages(java.io.File rootDir, java.io.File[] files, java.util.Collection<java.lang.String> packageNames, java.lang.String prefix)`

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class GrailsResourceUtils` | `appendPiecesForUri, applyRelativePath, classPackageAsResourcePath, cleanPath, extractJarFileURL, getAppDir, getArtefactDirectory, getClassName, getClassName, getClassNameForClassFile, getFile, getFile, getFile, getFilename, getPathFromBaseDir, getPathFromRoot, getRelativeInsideWebInf, getStaticResourcePathForResource, getViewsDir, instantiateFromConfig, instantiateFromFlatConfig, isDomainClass, isFileURL, isGrailsPath, isGrailsResource, isJarURL, isProjectSource, isProjectSource, toURI, toURI, useCachesIfNecessary`
    `class java.lang.Object` | `java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()`

- - ### Method Detail

    - #### static java.lang.Iterable<java.lang.String> getProjectPackageNames()

      Obtains the package names for the project. Works at development time only, do not use at runtime.

      Returns:
        The project package names

    - #### @groovy.transform.Memoized static java.lang.Iterable<java.lang.String> getProjectPackageNames(java.io.File baseDir)

    - #### protected static java.lang.Object populatePackages(java.io.File rootDir, java.io.File[] files, java.util.Collection<java.lang.String> packageNames, java.lang.String prefix)