trait AssetsFinder extends AnyRef
Can be used to find assets according to configured base path and URL base.
- Self Type
- AssetsFinder
- Source
- Assets.scala
- Alphabetic
- By Inheritance
- AssetsFinder
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Abstract Value Members
-
abstract
def
assetsBasePath: String
The configured assets path
-
abstract
def
assetsUrlPrefix: String
The configured assets prefix
-
abstract
def
findAssetPath(basePath: String, rawPath: String): String
Get the final path, unprefixed, for a given base assets directory.
Get the final path, unprefixed, for a given base assets directory.
- basePath
the location to look for the assets
- rawPath
the initial path of the asset
Concrete Value Members
-
def
path(rawPath: String): String
Used to obtain the final path of an asset according to assets configuration.
Used to obtain the final path of an asset according to assets configuration. This returns the minified path, if exists, with a digest if it exists. It is possible to use this in cases where minification and digests are used and where they are not. If no alternative file is found, the original filename is returned.
This method is like unprefixedPath, but it prepends the prefix defined in configuration.
Note: to get the path without a URL prefix, you can use
this.unprefixed.path(rawPath)
- rawPath
The original path of the asset
-
lazy val
unprefixed: AssetsFinder
- returns
an AssetsFinder with no URL prefix
-
def
withAssetsPath(newPath: String): AssetsFinder
Create an AssetsFinder with a custom assets location (replacing the current assets base path)
-
def
withUrlPrefix(newPrefix: String): AssetsFinder
Create an AssetsFinder with a custom URL prefix (replacing the current prefix)