ResourceUtils (Grails 6.0.0)

Package: grails.io

## [Groovy] Class ResourceUtils

- grails.io.ResourceUtils

-     @groovy.transform.CompileStatic
      class ResourceUtils
      extends GrailsResourceUtils

  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, CURRENT_PATH, DOMAIN_DIR_PATH, DOMAIN_PATH_PATTERN, FILE_URL_PREFIX, FOLDER_SEPARATOR, 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, KNOWN_DOMAIN_CLASSES, KNOWN_PATHS, PLUGIN_PATTERN, PLUGIN_RESOURCE_PATTERN, REGEX_FILE_SEPARATOR, RESOURCE_PATH_PATTERN, SPRING_SCRIPTS_PATH_PATTERN, TOP_PATH, 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, WINDOWS_FOLDER_SEPARATOR, grailsAppResourcePatterns, patterns`

  - ### Constructor Summary

    Constructors
    Constructor and description
    `ResourceUtils ()`

  - ### 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, call, classPackageAsResourcePath, cleanPath, collectionToDelimitedString, collectionToDelimitedString, createGrailsResourcePattern, deleteAny, delimitedListToStringArray, delimitedListToStringArray, extractJarFileURL, forName, getAppDir, getArtefactDirectory, getClassName, getClassName, getClassNameForClassFile, getFile, getFile, getFile, getFilename, getPathFromBaseDir, getPathFromRoot, getRelativeInsideWebInf, getStaticResourcePathForResource, getViewsDir, hasLength, instantiateFromConfig, instantiateFromFlatConfig, isDomainClass, isFileURL, isGrailsPath, isGrailsResource, isJarURL, isProjectSource, isProjectSource, removeEldestEntry, removeEldestEntry, replace, toStringArray, toURI, toURI, useCachesIfNecessary`

- - ### Constructor Detail

    - #### ResourceUtils()

  - ### 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)