code: private boolean checkChildren(boolean exclusive, int depth) {
          if (_children == null) {
              // a file
  
              return _owner == null || !(_exclusive || exclusive);
          } else {
              // a folder
  
              if (_owner == null) {
                  // no owner, checking children
  
                  if (depth != 0) {
                      boolean canLock = true;
                      int limit = _children.length;
                      for (int i = 0; i < limit; i++) {
                          if (!_children[i].checkChildren(exclusive, depth - 1)) {
                              canLock = false;
                          }
                      }
                      return canLock;
                  } else {
                      // depth == 0 -> we don't care for children
                      return true;
                  }
              } else {
                  // there already is a owner
                  return !(_exclusive || exclusive);
              }
          }
  
      }
docs: helper of checkLocks(). looks if the children are locked
  
  @param exclusive
  wheather the new lock should be exclusive
  @return true if no locks at the children paths are forbidding a new lock
  @param depth
  depth