isWithin method
Returns true
if this entity is a path beneath parent
, and false
otherwise.
Directory('/root/path/foo.dart').isWithin(Directory('/root/path')); // -> true
Directory('/root/path').isWithin(Directory('/root/other')); // -> false
Directory('/root/path').isWithin(Directory('/root/path')) // -> false
Implementation
bool isWithin(Directory parent) => path_helper.isWithin(parent.path, path);