onlyDirectory property

bool? get onlyDirectory

Returns true if node matches only directory; otherwise false.

Implementation

bool? get onlyDirectory {
  if (_onlyDirectory == null) {
    _onlyDirectory = false;
    if (!_isRoot!) {
      final last = _nodes!.last;
      if (last is GlobNodeLiteral) {
        _onlyDirectory = last.source!.endsWith('/');
      }
    }
  }

  return _onlyDirectory;
}