lucee.Component
commandbox.system.modules_app.system-commands.commands.dir
List the files and folders in a directory. Defaults to current working directory . {code:bash} dir samples/ {code} . File globbing patterns can be used to filter results. Can also be a list . {code:bash} dir **.cfc,*.cfm {code} . File globbing patterns can be used to exclude results. Can also be a list . {code:bash} dir paths=modules excludePaths=**.md --recurse {code} . Use the "recurse" parameter to show all nested files and folders. . {code:bash} dir samples/ --recurse {code} . Ordering results is in format of an ORDER BY SQL clause. Invalid sorts are ignored. . {code:bash} dir samples "directory asc, name desc" {code}
| Method Summary | |
|---|---|
private any
|
cleanRecursiveDir(any directory, any incoming, [any type])
Cleanup directory recursive nesting. |
private any
|
colorPath([any name], [any type])
|
private any
|
renderFileSize(numeric size, [string type='bytes'])
Returns file size in either b, kb, mb, gb, or tb. |
any
|
run([commandbox.system.modules_app.system-commands.commands.Globber paths='[runtime expression]'], [any sort='type, name'], [string excludePaths=''], [boolean recurse='false'], [boolean simple='false'])
|
| Methods inherited from class lucee.Component |
|---|
| None |
| Method Detail |
|---|
Cleanup directory recursive nesting
directoryincomingtypenametypeReturns file size in either b, kb, mb, gb, or tb
sizetypepathssort - Sort columns and direction. name, directory, size, type, dateLastModified, attributes, modeexcludePaths - A list of file glob patterns to excluderecurse - Include nested files and folderssimple - Output only path names and nothing else.