I am still unsure if you search the answer for Godot 3.x oder 2.x. Also some example paths would be helpful. Also why the paths would be relative and why there would be the need to convert them. I am also unsure if you mean relative paths in term of "res://" and "user://" or in terms of "../fileinparentdir.txt".
Helpful for path management (i put Godot 3.x links in here) is the File class:
https://docs.godotengine.org/en/latest/classes/class_file.html?highlight=absolute
It has the methods: get_path
and get_path_absolute
The caveat is that a file has to be opened for read to be able to use these methods. (I see no other way here at least)
Another helpful class is the String class:
https://docs.godotengine.org/en/latest/classes/class_string.html?highlight=path
It has some methods to split up a path to directory/filename/extension and also the methods : bool is_abs_path ( )
and bool is_rel_path ( )
Then there's also the OS class which gives paths to some directory used in the operating system. You can get these together with string functions to i.e. move paths between user:// and the absolute OS path.
Be aware that there might not always be a resource data dir in a released app. Resources (images, 3d, sound) might as well be into some package. Also ressources which you import/copy into a godot 3 project might not be present in the release as they may be converted and moved into another directory.