Return names of the files in the directory dir as a cell array of strings. If an error occurs, return an empty cell array in files.
If successful, err is 0 and msg is an empty string. Otherwise, err is nonzero and msg contains a system-dependent error message.