$file.ls Returns a directory listing |
Usage |
<array> $file.ls(<directory:string>,[<flags:string>[,<namefilter:string>]]) |
Description |
Returns the listing of the specified directory as an array. The <directory> should be given as a UNIX style path and is adjusted according to the system that KVIrc is running on. <flags> may be a combination of the following characters: If <flags> is empty, then a default of dfrwxhs is set. If none of the r,w,x flags are set then KVIrc sets all of them by default. If <namefilter> is passed then it is interpreted as a wildcard string that must match the entries to be returned. |
Examples |
%dir[]=$file.ls(/,"d") foreach(%f,%dir[])echo %f %dir[]=$file.ls(/usr/include,"f","t*.h"); foreach(%f,%dir[])echo %f %dir[]=$file.ls($file.homedir,"dfr"); foreach(%f,%dir[])echo %f |