<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def validate_data_dir(data_dir):
 """ Validates all files in a data_dir """


    all_meta, all_table, all_element, all_component = fileio.get_all_filelist(data_dir)

    for f in all_meta:
        full_path = os.path.join(data_dir, f)
        validate_file('metadata', full_path)
    for f in all_table:
        full_path = os.path.join(data_dir, f)
        validate_file('table', full_path)
    for f in all_element:
        full_path = os.path.join(data_dir, f)
        validate_file('element', full_path)
    for f in all_component:
        full_path = os.path.join(data_dir, f)
        validate_file('component', full_path)