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!

0

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
Avatar
Permanently deleted user

Thanks!

0

请先登录再写评论。