commandbox.system.modules_app.system-commands.commands

Class touch

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

Create a new file according to its name if it does not exist. If it exists, modify its last updated date and time to now. . {code:bash} touch file.txt {code} . Use the open parameter to open the file in your default editor after creating it . {code:bash} touch index.cfm --open {code} . Use the force parameter to overwrite the contents of the file to be empty even if it exists. . {code:bash} touch file.txt --force {code}

Class Attributes:
  • aliases : new
  •  
  • synchronized : false
  •  
  • accessors : false
  •  
  • persistent : false
  •  
    Method Summary
    any run(commandbox.system.modules_app.system-commands.commands.Globber file, [boolean force='false'], [boolean open='false'])
     
    Methods inherited from class lucee.Component
    None

    Method Detail

    run

    public any run(commandbox.system.modules_app.system-commands.commands.Globber file, [boolean force='false'], [boolean open='false'])

    Parameters:
    file - File or globbing pattern. Creates if not existing, otherwise updates timestamp
    force - Recreate the file even if it exists
    open - Open the file after creating it