Documentation
¶
Overview ¶
Package project turns the paths a user names — files, directories and glob patterns — into the model files to load, in a deterministic order.
Index ¶
Constants ¶
const Stdin = "-"
Stdin is the path that names standard input, by the convention that a lone "-" is read from the stream rather than from a file of that name. A file really called "-" is named as "./-".
const StdinName = "<stdin>"
StdinName is what a model read from standard input is called in diagnostics.
Variables ¶
This section is empty.
Functions ¶
func Expand ¶
Expand turns the paths named on a command line (or at a %load prompt) into the model files to load: a directory contributes every model file under it, a pattern contributes the model files among its matches, and any other path is taken as named. Files come back in a deterministic order — the inputs in the order given, each directory walk and each pattern match sorted by path — and duplicates are dropped, so naming a file twice loads it once.
func IsModelFile ¶
IsModelFile reports whether path names a SysML or KerML model file.
func ModelFiles ¶
ModelFiles walks dir and returns every .sysml/.kerml file under it, sorted by path. Hidden directories are skipped, so a repository's .git or a build cache under a dot-directory contributes nothing. Symlinked directories are walked — a project may keep a shared library as a link — each at most once, so a cycle terminates.
Types ¶
This section is empty.