You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Christian Müller <19...@gmail.com> on 2021/09/12 06:08:12 UTC
1983.christian.mueller@gmail.com
Hi everybody,
One short question: Is the javadoc description of
*commons.io.FileUtils.isRegularFile(...)* correct? It says it returns
"false" if the path is not a directory. Actually "false" is returned for
existing directories. I think the javadoc should be corrected to:
"return false if path is a directory", right?
Best regards,
Christian
Re: 1983.christian.mueller@gmail.com
Posted by sebb <se...@gmail.com>.
On Sun, 12 Sept 2021 at 11:50, Christian Müller
<19...@gmail.com> wrote:
>
> Hi everybody,
>
> One short question: Is the javadoc description of
> *commons.io.FileUtils.isRegularFile(...)* correct? It says it returns
> "false" if the path is not a directory. Actually "false" is returned for
> existing directories. I think the javadoc should be corrected to:
> "return false if path is a directory", right?
>
Thanks for the report - the Javadoc is definitely wrong.
However I think it should say
"is not a regular file"
rather than
"is not a directory"
That is what the underlying JVM method File.isRegularFile(...) does.
That would imply that it returns false for directories, as they are
not regular files.
> Best regards,
>
> Christian
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org