lucee.Componentcommandbox.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}
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 |
---|
file
- File or globbing pattern. Creates if not existing, otherwise updates timestampforce
- Recreate the file even if it existsopen
- Open the file after creating it