isWithin function
Returns true
if child
is a path beneath parent
, and false
otherwise.
p.isWithin('/root/path', '/root/path/a'); // -> true
p.isWithin('/root/path', '/root/other'); // -> false
p.isWithin('/root/path', '/root/path') // -> false
Implementation
bool isWithin(String parent, String child) => context.isWithin(parent, child);