type
Pod
Pod represents a module of Types. Pods serve as a type namespace as well as unit of deployment and versioning.
methods
config |
Convenience for |
---|---|
depends |
Get the declared list of dependencies for this pod. |
doc |
Return the fandoc chapter for this pod or null if not available. |
file |
Look up a resource file in this pod. |
files |
List all the resource files contained by this pod. |
find |
Find a pod by name. |
flattenDepends |
Expand a set of pods to include all their recursive dependencies. |
list |
Get a list of all the pods installed. |
load |
Load a pod into memory from the specified input stream. |
locale |
Convenience for |
log |
Return the log for this pod's name. |
meta |
Get the meta name/value pairs for this pod. |
name |
Simple name of the pod such as "sys". |
of |
Get the pod of the given instance which is convenience for |
orderByDepends |
Order a list of pods by their dependencies. |
props |
Convenience for |
toStr |
Always return name(). |
type |
Find a type by name. |
types |
List of all the defined types. |
uri |
Uri for this pod which is always "fan://{name}". |
version |
Version number for this pod. |
Slot Details
config
src
Str? config(Str name, Str? def := null)
Convenience for Env.config
.
depends
doc
file
src
File? file(Uri uri, Bool checked := true)
Look up a resource file in this pod. The URI must start with the Pod's uri
or be path absolute. If the file cannot be found then return null or throw UnresolvedErr based on checked flag.
Examples:
Pod.find("icons").file(`/x16/cut.png`) Pod.find("icons").file(`fan://icons/x16/cut.png`) `fan://icons/x16/cut.png`.get
files
find
flattenDepends
src
static Pod[] flattenDepends(Pod[] pods)
Expand a set of pods to include all their recursive dependencies. This method does not order them; see orderByDepends
.
list
load
src
static Pod load(InStream in)
Load a pod into memory from the specified input stream. The stream must contain a valid pod zip file with all the definitions. The pod is completely loaded into memory and the input stream is closed. The pod cannot have resources. The pod name as defined by /pod.def
must be uniquely named or Err is thrown.
locale
src
Str? locale(Str name, Str? def := "pod::name")
Convenience for Env.locale
using Locale.cur
.
log
meta
name
of
orderByDepends
src
static Pod[] orderByDepends(Pod[] pods)
Order a list of pods by their dependencies. This method does not flatten dependencies - see flattenDepends
.