EXTENSION
Template.Item
swift
extension Template.ItemMethods
string(path:contents:)
swift
public static func string(path: String, contents: String) -> Template.Item- Parameters:
- path: Path where to generate file
- contents: String Contents
- Returns:
Template.Itemthat is.string
Parameters
| Name | Description |
|---|---|
| path | Path where to generate file |
| contents | String Contents |
file(path:templatePath:)
swift
public static func file(path: String, templatePath: Path) -> Template.Item- Parameters:
- path: Path where to generate file
- templatePath: Path of file where the template is defined
- Returns:
Template.Itemthat is.file
Parameters
| Name | Description |
|---|---|
| path | Path where to generate file |
| templatePath | Path of file where the template is defined |
directory(path:sourcePath:)
swift
public static func directory(path: String, sourcePath: Path) -> Template.Item- Parameters:
- path: Path where will be copied the folder
- sourcePath: Path of folder which will be copied
- Returns:
Template.Itemthat is.directory
Parameters
| Name | Description |
|---|---|
| path | Path where will be copied the folder |
| sourcePath | Path of folder which will be copied |
