isSubPath

fun isSubPath(parent: File, child: File): Boolean

Checks whether a child file is located in parent or any of its subdirectories. Symlinks are resolved to their real paths when possible, so that a symlink inside parent pointing outside it is correctly detected as not being a sub-path.

Return

true if the child is located in the parent, false otherwise

Parameters

parent

the parent directory

child

the child file