KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I am trying to find if given path is possible child of another path using java. Both path may not exist. Say c:\Program Files\My Company\test\My App is a possible child of c:\Program Files . Currently I am doing this with boolean myCheck(File maybeChild, File possibleParent) { return maybeChild.getAbsolutePath().startsWith( possibleParent.getAbsolutePath()); }
Tags (comma-separated)
Save Edits
Cancel