Package org.jbake.app
Class Asset
- java.lang.Object
-
- org.jbake.app.Asset
-
public class Asset extends java.lang.ObjectDeals with assets (static files such as css, js or image files).
-
-
Constructor Summary
Constructors Constructor Description Asset(java.io.File source, java.io.File destination, org.apache.commons.configuration2.CompositeConfiguration config)Deprecated.UseAsset(JBakeConfiguration)instead.Asset(JBakeConfiguration config)Creates an instance of Asset.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcopy()Copy all files from assets folder to destination folder read from configurationvoidcopy(java.io.File path)Copy all files from supplied path.voidcopyAssetsFromContent(java.io.File path)Responsible for copying any asset files that exist within the content directory.voidcopySingleFile(java.io.File asset)Copy one asset file at a time.java.util.List<java.lang.Throwable>getErrors()Accessor method to the collection of errors generated during the bakebooleanisAssetFile(java.io.File path)Determine if a given file is an asset file.
-
-
-
Constructor Detail
-
Asset
@Deprecated public Asset(java.io.File source, java.io.File destination, org.apache.commons.configuration2.CompositeConfiguration config)Deprecated.UseAsset(JBakeConfiguration)instead. Compatibility constructor. Creates an instance of Asset.- Parameters:
source- Source file for the assetdestination- Destination (target) directory for asset fileconfig- Project configuration
-
Asset
public Asset(JBakeConfiguration config)
Creates an instance of Asset.- Parameters:
config- The project configuration. @see{JBakeConfiguration}
-
-
Method Detail
-
copy
public void copy()
Copy all files from assets folder to destination folder read from configuration
-
copy
public void copy(java.io.File path)
Copy all files from supplied path.- Parameters:
path- The starting path
-
copySingleFile
public void copySingleFile(java.io.File asset)
Copy one asset file at a time.- Parameters:
asset- The asset file to copy
-
isAssetFile
public boolean isAssetFile(java.io.File path)
Determine if a given file is an asset file.- Parameters:
path- to the file to validate.- Returns:
- true if the path provided points to a file in the asset folder.
-
copyAssetsFromContent
public void copyAssetsFromContent(java.io.File path)
Responsible for copying any asset files that exist within the content directory.- Parameters:
path- of the content directory
-
getErrors
public java.util.List<java.lang.Throwable> getErrors()
Accessor method to the collection of errors generated during the bake- Returns:
- a list of errors.
-
-