List all folders and sub-folders on android

Does anyone know how to list all files,folders and sub-folders on Android phones in a single list.

Generally speaking, that’s not possible (for security reasons). Each app is only permitted access to a specific subset of the filesystem.

in my app I have access to all the folders and subfoilders in the filesystem i.e when you click on a file it shows the files and folders inside it. I just wish to make that a list.