All Files / VirtualFile's in project

Is there an easy/quick/standard way of getting an array/collection of
all files in a project?

I can get the modules via the ModuleManager for a project, and from
there get the module path, but there doesn't seem to be a direct way of
finding the source paths from the module. At lest not a clean API method.

But from there, all I could do is trawl the file system for File[]'s,
but how can I tell if there in a "project" or not ( i.e. CVS control
files ).

Is there a standard/simple way?


--
Discouragement is a dissatisfaction with the past, a distaste for the
present, and a distrust of the future - Maree De Jong, CLCA.

Mark Derricutt --- mark@ talios.com --- http://www.talios.com

2 comments

ModuleRootManager mrm = ModuleRootManager.getInstance(module);
VirtualFile dirs[] = mrm.getFiles(OrderRootType.SOURCES);


"Mark Derricutt" <mark@talios.com> wrote in message
news:c6vdg5$7o0$1@is.intellij.net...

Is there an easy/quick/standard way of getting an array/collection of
all files in a project?

>

I can get the modules via the ModuleManager for a project, and from
there get the module path, but there doesn't seem to be a direct way of
finding the source paths from the module. At lest not a clean API method.

>

But from there, all I could do is trawl the file system for File[]'s,
but how can I tell if there in a "project" or not ( i.e. CVS control
files ).

>

Is there a standard/simple way?

>
>

--
Discouragement is a dissatisfaction with the past, a distaste for the
present, and a distrust of the future - Maree De Jong, CLCA.

>

Mark Derricutt --- mark@ talios.com --- http://www.talios.com



0

Brad wrote:

ModuleRootManager mrm = ModuleRootManager.getInstance(module);
VirtualFile dirs[] = mrm.getFiles(OrderRootType.SOURCES);


Sweet. I wonder what other *Manager classes there are out there that I
havn't found yet :)


--
Discouragement is a dissatisfaction with the past, a distaste for the
present, and a distrust of the future - Maree De Jong, CLCA.

Mark Derricutt --- mark@ talios.com --- http://www.talios.com

0

Please sign in to leave a comment.