Rake FileList Includes Request

T

T. Onoma

I would like to make a request for a Rake feature. When using FileList
directives, such as the rdoc task's #include (I assume it is a FileList), it
would be nice if it didn't throw an error for files it could not find, a
warning should, I think, suffice.

Thanks,
T.
 
J

Jim Weirich

T. Onoma said:
I would like to make a request for a Rake feature. When using FileList
directives, such as the rdoc task's #include (I assume it is a FileList),
it
would be nice if it didn't throw an error for files it could not find, a
warning should, I think, suffice.

FileList itself generally doesn't care if the file names in its list exist
or not. It must be the software that is using the file list that is
complaining. For example, if you pass a list of files to RDoc, and one of
the files doesn't exist, then it is RDoc that would complain, not
FileList.

If you wish, you can filter out non-existant files before they go to other
software with:

a_file_list.delete_if { |fn| ! File.exist?(fn) }
 
T

T. Onoma

FileList itself generally doesn't care if the file names in its list exist
or not. It must be the software that is using the file list that is
complaining. For example, if you pass a list of files to RDoc, and one of
the files doesn't exist, then it is RDoc that would complain, not
FileList.

Thanks, I misjudged the source of that problem.
If you wish, you can filter out non-existant files before they go to other
software with:

a_file_list.delete_if { |fn| ! File.exist?(fn) }

Worked!

Thanks,
T.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top