Space analyzer show all files from storage by size

i am trying to built a feature for my app it will show the all apps including media files in internal and external storage and it will be shown in list by size the large file first, Does not matter it is a media file or app file. Need help.....