Is there a way to get directory of a current script location in kotlin script?
I could achieve this in bash with
dirname $0
or
# Absolute path to this script. /home/user/bin/foo.sh
SCRIPT=$(readlink -f $0)
# Absolute path this script is in. /home/user/bin
SCRIPTPATH=`dirname $SCRIPT`
You can use:
File(".")
and don't forget to
import java.io.File