new getFiles, can be used on any platform