- Source:
Resource Factory
Methods
(static) createAdapter(parameters) → {module:@ui5/fs.adapters.FileSystem|module:@ui5/fs.adapters.Memory}
- Source:
Creates a resource
ReaderWriter.
If a file system base path is given, file system resource ReaderWriter is returned.
In any other case a virtual one.
Parameters:
| Name | Type | Description | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
parameters |
object | Parameters
Properties
|
Returns:
File System- or Virtual Adapter
(static) createCollectionsForTree(tree, parametersopt) → {object}
- Source:
Creates resource reader collections for a (sub-)tree. Returns an object of resource readers:
{
source: Resource reader for source resources
dependencies: Resource readers for dependency resources
}
Parameters:
| Name | Type | Attributes | Description | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
tree |
object | A (sub-)tree | |||||||||||||||||
parameters |
object |
<optional> |
Parameters
Properties
|
Returns:
Object containing
source and dependencies resource readers
- Type
- object
(static) createResource(parameters) → {module:@ui5/fs.Resource}
- Source:
Creates a
Resource. Accepts the same parameters as the Resource constructor.
Parameters:
| Name | Type | Description |
|---|---|---|
parameters |
object | Parameters to be passed to the resource constructor |
Returns:
Resource
(static) createWorkspace(parameters) → {module:@ui5/fs.DuplexCollection}
- Source:
Creates a Workspace
A workspace is a DuplexCollection which reads from the project sources. It is used during the build process
to write modified files into a separate writer, this is usually a Memory adapter. If a file already exists it is
fetched from the memory to work on it in further build steps.
Parameters:
| Name | Type | Description | |||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
parameters |
object |
Properties
|
Returns:
DuplexCollection which wraps the provided resource locators
Type Definitions
getProjectExcludes(Project) → {Array.<string>}
- Source:
Callback to retrieve excludes for a given project
Parameters:
| Name | Type | Description |
|---|---|---|
Project |
object |
Returns:
List of glob patterns to exclude
- Type
- Array.<string>
getVirtualBasePathPrefix(parameters) → {string}
- Source:
Callback to retrieve a prefix to use for a given virtual base path of a project
Parameters:
| Name | Type | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
parameters |
object | Parameters
Properties
|
Returns:
Prefix for the virtual base path
- Type
- string