Thanks for learning about:
"/"*relpath((@__FILE__)*"/../..","/")
According to it ?relpath, it gives the path from the location of the second argument in the file system to the first argument. Is this better than a double solution dirname?
A variant of the same amenities:
normpath(joinpath(@__FILE__,"..",".."))
The closest Ruby equivalent could be:
realpath(dirname(@__FILE__)*"/..")
source
share