@Override
	public List<GTreeNode> generateChildren(TaskMonitor monitor) throws CancelledException {

		List<GTreeNode> children = new ArrayList<>();
		if (domainFolder == null || domainFolder.isEmpty()) {
			return children;
		}

		// NOTE: isEmpty() is used to avoid multiple failed connection attempts on this folder

		DomainFolder[] folders = domainFolder.getFolders();
		for (DomainFolder folder : folders) {
			monitor.checkCancelled();
			children.add(new DomainFolderNode(folder, filter));
		}

		DomainFile[] files = domainFolder.getFiles();
		for (DomainFile domainFile : files) {
			monitor.checkCancelled();
			if (domainFile.isLinkFile() && filter != null && filter.followLinkedFolders()) {
				DomainFolder folder = domainFile.followLink();
				if (folder != null) {
					children.add(new DomainFolderNode(folder, filter));
					continue;
				}
			}
			if (filter == null || filter.accept(domainFile)) {
				children.add(new DomainFileNode(domainFile));
			}
		}
		Collections.sort(children);
		return children;
	}
Returns whether this node is marked as deleted.
Ghidra/Framework/Project/src/main/java/ghidra/framework/main/datatree/DomainFolderNode.java