INNER CODE UNIT · Python

prefix_length

ApodexAI/FrontierAgent · apodex/tui/app.py:181

    prefix_length = len(base) + 1
    found: list[str] = []
    stack: list[str] = [str(root)]
    while stack and len(found) < limit:
        try:
            entries = list(os.scandir(stack.pop()))
        except OSError:
            continue
        for entry in entries:
            if len(found) >= limit:
                break
            try:
                if entry.is_symlink():
                    continue
                if entry.is_dir(follow_symlinks=False):
                    if entry.name not in _WORKSPACE_SEARCH_SKIP_DIRS:
                        stack.append(entry.path)
                    continue

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…