commandbox.system

Class BaseTask

lucee.Component
    extended by commandbox.system.BaseCommand
      extended by commandbox.system.BaseTask

Copyright Since 2014 CommandBox by Ortus Solutions, Corp www.coldbox.org | www.ortussolutions.com I am the base task implementation. An abstract class if you will.

Class Attributes:
  • synchronized : false
  •  
  • accessors : true
  •  
  • persistent : false
  •  
  • author : Brad Wood, Luis Majano, Denny Valliant
  •  
    Method Summary
    any loadModule(string moduleDirectory)
         Loads a module into memory from disk.
    any resolvePath(string path, [any basePath='[runtime expression]'])
         This resolves an absolute or relative path using the rules of the operating system and CLI.
    any task(any taskFile='task')
         Run another task by DSL.
     
    Methods inherited from class commandbox.system.BaseCommand
    ask, checkInterrupted, classLoad, command, confirm, error, getCR, getCWD, getEnv, getExitCode, getFileSystemUtil, getFormatterUtil, getInstance, getJob, getLogger, getParser, getPrint, getPrinter, getResult, getShell, getSystemProperty, getSystemSetting, getSystemSettings, getWirebox, globber, hasError, init, multiSelect, openPath, openURL, propertyFile, reset, run, runCommand, setCR, setExitCode, setFileSystemUtil, setFormatterUtil, setJob, setLogger, setParser, setPrint, setShell, setSystemSettings, setWirebox, waitForKey, watch
     
    Methods inherited from class lucee.Component
    None

    Method Detail

    loadModule

    public any loadModule(string moduleDirectory)

    Loads a module into memory from disk. Relative paths will be resolved based on the location of the task runner CFC. The module will be left in memory and will not be unloaded. If the module is already loaded in memory, nothing will happen.

    Parameters:
    moduleDirectory - Path to module folder. Ex: build/modules/myModule/

    resolvePath

    public any resolvePath(string path, [any basePath='[runtime expression]'])

    This resolves an absolute or relative path using the rules of the operating system and CLI. It doesn't follow CF mappings and will also always return a trailing slash if pointing to an existing directory. Resolve the incoming path from the file system

    Overrides:
    resolvePath in class BaseCommand
    Parameters:
    path - The directory to resolve
    basePath - An expanded base path to resolve the path against. Defaults to direcory that the task lives in.

    task

    public any task(any taskFile='task')

    Run another task by DSL.

    Parameters:
    taskFile - The name of the task to run.