commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gary D. Gregory (Issue Comment Edited) (JIRA)" <j...@apache.org>
Subject [jira] [Issue Comment Edited] (IO-291) Add new function FileUtils.isContained
Date Sat, 05 Nov 2011 15:22:51 GMT

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

Gary D. Gregory edited comment on IO-291 at 11/5/11 3:21 PM:
-------------------------------------------------------------

Attaching my version of the patch with discussed changes. What is not clear to me is if this
is the best choice:

{code:java}
    public void testUnrealizedContainment() throws IOException {
	final File dir = new File("DOESNOTEXIST");
	final File file = new File(dir, "DOESNOTEXIST2");
        assertFalse(dir.exists());	
        assertFalse(file.exists());	
        assertFalse(FileUtils.contains(dir, file));
    }
{code}

as opposed to:
{code:java}
assertTrue(FileUtils.contains(dir, file));
{code}

The relationship in b/w parent and child is valid but unrealized on disk. Shouldn't contain
value the relationship as valid even if unrealized? I am inclined to say yes.

Thoughts?
                
      was (Author: garydgregory):
    Attaching my version of the patch with discussed changes. What is not clear to me is if
this is the best choice:

{code:java}
    public void testUnrealizedContainment() throws IOException {
	final File dir = new File("DOESNOTEXIST");
	final File file = new File(dir, "DOESNOTEXIST2");
        assertFalse(dir.exists());	
        assertFalse(file.exists());	
        assertFalse(FileUtils.contains(dir, file));
    }
{code}

as opposed to:
{code:java}
assertFalse(FileUtils.contains(dir, file));
{code}

The relationship in b/w parent and child is valid but unrealized on disk. Shouldn't contain
value the relationship as valid even if unrealized? I am inclined to say yes.

Thoughts?
                  
> 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
>            Assignee: Gary D. Gregory
>              Labels: patch
>             Fix For: 2.1
>
>         Attachments: FileUtils.isContained.patch, io-291.diff
>
>
> 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

        

Mime
View raw message