added checkExist for file > 0 bytes

This commit is contained in:
Asif Bacchus 2018-10-25 09:06:35 -06:00
parent 3c5d766d0c
commit 93a0cce519

View File

@ -144,6 +144,15 @@ function checkExist {
# not found # not found
return 1 return 1
fi fi
elif [ "$1" = "fs" ]; then
# find file > 0 bytes
if [ -s "$2" ]; then
# found
return 0
else
# not found
return 1
fi
elif [ "$1" = "fd" ]; then elif [ "$1" = "fd" ]; then
# find directory # find directory
if [ -d "$2" ]; then if [ -d "$2" ]; then