Your code shows all files/directories, if you do not want to show hidden files, check for the filnames/directrory names beginning with a period '.'.