How to get the absolute document path in code

is there a system variable, macro or a function that would give me the absolute path to uploaded documents in code (php functions or events in applications)? The path is set during app deployment in “Documents Folder” and is usually in …/_lib/file/doc