No convenient function is provided to search for files within a single directory - listdir is recursive.
Need listthisdir or similar.
Example of requirement. Administrators often copy interesting log files to a subdirectory of the directory where the log files are generated. Under these circumstances, a recursive listing makes log file rollover unnecessarily difficult.