Getting project directory

Hi,

Some people setup their projects in such a way that their IDEA project files are in a different location than their source code. Is there a way to figure out where the actual source directory is?

Thanks!

2 comments
Comment actions Permalink

The source code of a project can be in any number of directories, not just a single one. You can enumerate them using ProjectRootManager.getContentRoots().

0

Please sign in to leave a comment.