fs: littlefs: sample: Move listing directory code to its own function

The code for presenting content of the directory, has been moved to the
separate function to be easily reusable.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
1 file changed