I need to get a list of available files defined by the Project Control File (PCF) within the current Compass Project. I would also like to get a list of all files, regardless of their availability.
The first part, getting the list of currently available files by type within the Compass project works as follows,
and file15s will be a complete listing of available files. That is all files that are available on the disk.
The second part, determining all defined files, regardless of availablity, can be done by querying the Pcf directly. You can do this with the following snippet,
now file15s will be a list containing all files defined in the PCF, regardless of their availablity on the disk.
If you want to get the current listing of file use the grail.compass.cmpsys getfilelistbytype. If you want to get all defined files, regardless of their availablity, use the grail.data.pcf Pcf class to query the Project Control File directly.
Keep in mind that the grail.compass.cmpsys routines are only availabe from within the context of Compass Style Script.