lucee.Componentcommandbox.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, [boolean full])
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'], [boolean full='false'])
|
Methods inherited from class lucee.Component |
---|
None |
Method Detail |
---|
Cleanup directory recursive nesting
directory
incoming
full
name
type
Returns file size in either b, kb, mb, gb, or tb
size
type
paths
- The directory to list the contents of or a list of file Globbing path to filter onsort
- 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.full
- Output abolute file path, not just relative to current working directory