https://kotlinlang.org logo
#scripting
Title
# scripting
i

irus

06/23/2018, 1:38 PM
Any way to get script absolute path? Like $0 in bash
o

orangy

06/23/2018, 1:48 PM
I think some hackery around reflection, class loaders, URLClassLoaders, etc. can help
But that would give you binary path, not source path
If you own scripting host, you can pass data into a script.
i

irus

06/23/2018, 2:10 PM
Yes, It's obvious solution to pass script path to script as argument.