org.rythmengine.resource
Class FileResourceLoader
java.lang.Object
org.rythmengine.resource.ResourceLoaderBase
org.rythmengine.resource.FileResourceLoader
- All Implemented Interfaces:
- ITemplateResourceLoader
public class FileResourceLoader
- extends ResourceLoaderBase
Implement a File resource loader
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FileResourceLoader
public FileResourceLoader(RythmEngine engine,
File root)
load
public ITemplateResource load(String path)
- Description copied from interface:
ITemplateResourceLoader
- Load template resource by path
- Returns:
- Loaded template resource
getResourceLoaderRoot
public String getResourceLoaderRoot()
- Description copied from interface:
ITemplateResourceLoader
- Return root path of this resource loader
- Returns:
- the root path
getRoot
public File getRoot()
scan
public void scan(TemplateResourceManager manager)
- Description copied from interface:
ITemplateResourceLoader
- Scan the folder and try to load all template files under the folder.
Once a resource is located, it should be passed to the
resource manager by
TemplateResourceManager.resourceLoaded(ITemplateResource) call
Note it is up to the loader implementation to decide the root path where
to start the scan
- Specified by:
scan in interface ITemplateResourceLoader- Overrides:
scan in class ResourceLoaderBase
- Parameters:
manager - the resource manager
Copyright © 2014. All Rights Reserved.