how to get the path of the object?

e.g. If object “50081 Update Data” is under: Financial Management / General Ledger / Reports / ,

How can i get the path string(Financial Management / General Ledger / Reports / ,) of this object in the code?

Thank you very much.