commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yu Kobayashi (JIRA)" <j...@apache.org>
Subject [jira] Updated: (IO-184) FileUtils.isAncestor
Date Sun, 02 Nov 2008 13:31:44 GMT

     [ https://issues.apache.org/jira/browse/IO-184?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Yu Kobayashi updated IO-184:
----------------------------

    Component/s: Utilities

> FileUtils.isAncestor
> --------------------
>
>                 Key: IO-184
>                 URL: https://issues.apache.org/jira/browse/IO-184
>             Project: Commons IO
>          Issue Type: Improvement
>          Components: Utilities
>            Reporter: Yu Kobayashi
>            Priority: Minor
>
> Please add FileUtils.isAncestor(). Code is following.
> public static boolean isAncestor(File file, File ancestor) {
> 	File f = file;
> 	while (f != null) {
> 		if (f.equals(ancestor)) return true;
> 		f = f.getParentFile();
> 	}
> 	return false;
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message