commandbox.system.modules_app.system-commands.commands

Class tokenReplace

lucee.Component
    extended by commandbox.system.modules_app.system-commands.commands.tokenReplace

Replace text tokens in one or more files. Token matches are case insensitive. . {code:bash} tokenReplace path=/path/to/file.txt token="@@version@@" replacement=`package version` tokenReplace path=/tests/*.cfc token="@@version@@" replacement=`package version` {code} . Use the "verbose" param to see all the files affected . {code:bash} tokenReplace path=file.txt token="foo" replacement="bar" {code}

Class Attributes:
  • synchronized : false
  •  
  • accessors : false
  •  
  • persistent : false
  •  
    Method Summary
    any run(commandbox.system.modules_app.system-commands.commands.Globber path, String token, String replacement, [boolean verbose='false'])
     
    Methods inherited from class lucee.Component
    None

    Method Detail

    run

    public any run(commandbox.system.modules_app.system-commands.commands.Globber path, String token, String replacement, [boolean verbose='false'])

    Parameters:
    path - file(s) to replace tokens in. Globbing patters allowed such as *.txt
    token - The token to search for
    replacement - The replacement text to use
    verbose - Output file names that have been modified