getFiles method