Hi

Yes it's used for scanning sub directories. Maybe the option should be renamed 
to something more intuitive (subfolder / subdir) or anyone got a better name?

The description is wiki is currently:
if a directory, will look for changes in files in all the sub directories. 
Notice: Default value in Camel 1.4 or older is true. In Camel 1.5 the default 
value is changed to false.


Anything we should change here?



Med venlig hilsen
 
Claus Ibsen
......................................
Silverbullet
Skovsgårdsvænget 21
8362 Hørning
Tlf. +45 2962 7576
Web: www.silverbullet.dk

-----Original Message-----
From: tourist604 [mailto:[EMAIL PROTECTED] 
Sent: 8. august 2008 20:50
To: [email protected]
Subject: FileEndpoing "consumer.recursive" is misleading


Hi,

I think the "consumer.recursive" parameter which can be passed to a polling
FileEndpoint is misleading. The way I read it (and perhaps others) is that
subdirectories of the passed directory are not scanned for files. Instead,
recursive=false will prevent any directory scanning at all:

(Camel 1.4.0)

in FileConsumer, line 57:

int rc = pollFileOrDirectory(endpoint.getFile(), isRecursive());

in FileConsumer, line 75:

protected int pollFileOrDirectory(File fileOrDirectory, boolean processDir)
{
     if (!fileOrDirectory.isDirectory()) {
            return pollFile(fileOrDirectory); // process the file
     } else if (processDir) {
...
} else {
         LOG.debug("Skipping directory " + fileOrDirectory); // <!-- when
uri is directory and recursive=false
        return 0;
}

I think a "recursive" parameter meaning whether to scan subdirectories is
useful. Perhaps some renaming is in order.

Cheers,
--Bill


-- 
View this message in context: 
http://www.nabble.com/FileEndpoing-%22consumer.recursive%22-is-misleading-tp18897261s22882p18897261.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to