how to get codebase name and directory structure from which part of code?