How i can get Root path "from Settings | Build, Execution, Deployment | Deployment"?

Hello there, i have the question: "How i can get Root path “from Settings | Build, Execution, Deployment | Deployment”?
I am trying to getting info something like this: val publishConfig = project!!.getService(PublishConfig::class.java) and getting state publishConfig.state, but here a found info like: mapping, exclude paths and etc, but no info about root path :frowning:
Can someone give me the advice how i can get it? (Getting info from WebServers.xml - not a good idea, because i think that we can get this info from IDE and parsing xml manually - the wrong way)

And do I understand correctly how it works in the IDEA itself: “Webservers or deployment XML is parsed, and then the values ​​are moved from there to the IDE settings and are not stored anywhere else so that they can be retrieved programmatically?”