[TxMt] Re: enumerate all files in project

Robert J. Carr rjcarr at gmail.com
Mon Mar 2 02:59:38 UTC 2009


Thanks Rob ... a couple comments:

>> I'm working on a command that I'd like to be able to apply to all
>> files in my project.  Looking at the env vars I only see items for
>> working with the current file.  Is there any way to get a list of all
>> files in the current project?
>
> It depends on what language you're writing the command with, but if it
> were a shell script for example, you could get a list of all files in
> the project with:
>
>     find $TM_PROJECT_DIRECTORY

But your project directory doesn't necessarily have anything to do
with the files in your project.  The best I could come up with is to
inspect your tmproj file (TM_PROJECT_FILEPATH) as that lists (in
xml/plist) the relative folders/files you've added to your project.

I guess my question is ... is the contents of this flle already parsed
and made available somehow or would I need to parse it again?

> Not sure, short of exploring the directory manually, but you can
> always see what variables are set by running the "Show TM_* Variables"
> command in the "Bundle Development" bundle. Maybe you already knew that.

I was looking for something that described what is available at a high
level.  I'm fine with digging around. :)

Thanks-
Robert



More information about the textmate mailing list