[ 
https://issues.apache.org/jira/browse/IO-291?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13144693#comment-13144693
 ] 

Gary D. Gregory commented on IO-291:
------------------------------------

For these kinds of methods I prefer, "contains(parent, child)" where the first 
argument is the receiver of the verb and the following arguments are the actual 
arguments. Which would translate to "parent.contains(child)". The is like the 
Collection.contains method.

The next issue is whether "contains(file, file)" should return true or false. 
Does a file contain itself? Does a directory contains itself? 

If you think of a directory as a collection of files and directories, it does 
not, unless "." is listed.
                
> Add new function FileUtils.isContained
> --------------------------------------
>
>                 Key: IO-291
>                 URL: https://issues.apache.org/jira/browse/IO-291
>             Project: Commons IO
>          Issue Type: New Feature
>          Components: Utilities
>    Affects Versions: 2.1
>            Reporter: Pier-Luc Caron St-Pierre
>              Labels: patch
>             Fix For: 2.1
>
>         Attachments: FileUtils.isContained.patch
>
>
> I added a function that determines whether the specified leaf is contains by 
> the specified composite.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to