PathEnv
const class PathEnv : Env
PathEnv is a simple implementation of a Fantom environment which uses a search path to resolve files.
Constructor initializes the search path using the FAN_ENV_PATH environment variable (see Env.vars)
Get the environment variables as a case insensitive, immutable map of Str name/value pairs
Search path of directories in priority order
Search path for given file
Temp directory is always under workDir
Search path for all "lib/fan/*.pod" files
Working directory is always first item in path
Search path for all versions of given file
virtual File[] findAllFiles(Uri uri)
Search path for all versions of given file.
virtual Str[] findAllPodNames()
Search path for all "lib/fan/*.pod" files.
virtual File? findFile(Uri uri, Bool checked)
Search path for given file.
new make()
Constructor initializes the search path using the FAN_ENV_PATH environment variable (see Env.vars).
virtual File[] path()
Search path of directories in priority order. The last item in the path is always the Env.homeDir
virtual File tempDir()
Temp directory is always under workDir.
const virtual Str:Str : vars
Get the environment variables as a case insensitive, immutable map of Str name/value pairs. The environment map is initialized from the following sources from lowest priority to highest priority:
- shell environment variables
- Java system properties (Java VM only obviously)
- props in "fan.props" prefixed with "env."
virtual File workDir()
Working directory is always first item in path.