<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _recursive_get_all_file_names(dir):
 """ Get all the file names in the directory. Gets all the top level file names only, not the full path. dir: a directory or string, as to hand to os.walk(). If None, returns empty list. """

    if not dir:
        return []

    result = []
    for basedir, dirs, files in os.walk(dir):
        result.extend(files)

    return result