Is there any peoplecode methods available to get webserver directory?
If I understand correctly, you are looking for a way to determine a directory (dynamically) at runtime.
use a URL and the GetURL(URL."URL_ID_VALUE") function to achieve this for you? This way you can configure the path and if you decide to change the requirements (read: directory), then all it would take is adjust the URL.