Normally an ls will just produce the actual contents of the current or target directory eg.
ls mydir
myfile1
myfile2
myfile3
But what if you need to find the full or relative path to another program that cares whether that be zip or etc.?
You need the "-d" switch and the asterisk inside the actual directory.
ls -d mydir/*
mydir/myfil........
It's very simple test to see if the directory exists or not. See the directory test in bash below:
if [ -d /home/mydir ]; then
echo "my directory exists"
fi........