```python:inference/core/managers/inference_models_cache_watchdog.py
import os
from dataclasses import dataclass
from datetime import datetime
from typing import List

BYTES_IN_MB = 1024 * 1024
LOCK_POSTFIX = ".lock"


@dataclass(frozen=True)
class FileInfo:
    path: str
    size_mb: float
    modified_at: datetime


def list_files(path: str) -> List[FileInfo]:
    path = os.path.abspath(path)
    if not os.path.exists(path):
        return []
    if os.path.islink(path):
        return []
    if os.path.isfile(path):
        if path.endswith(LOCK_POSTFIX):
            return []
        stat = os.stat(path)
        return [
            FileInfo(
                path=path,
                size_mb=stat.st_size / BYTES_IN_MB,
                modified_at=datetime.fromtimestamp(stat.st_mtime),
            )
        ]
    results = []
    bytes_in_mb = BYTES_IN_MB
    lock_postfix = LOCK_POSTFIX
    datetime_fromtimestamp = datetime.fromtimestamp
    
    def scan_directory(dir_path: str) -> None:
        try:
            with os.scandir(dir_path) as entries:
                for entry in entries:
                    if entry.is_symlink():
                        continue
                    if entry.is_file(follow_symlinks=False):
                        if entry.name.endswith(lock_postfix):
                            continue
                        try:
                            stat = entry.stat(follow_symlinks=False)
                            results.append(
                                FileInfo(
                                    path=entry.path,
                                    size_mb=stat.st_size / bytes_in_mb,
                                    modified_at=datetime_fromtimestamp(stat.st_mtime),
                                )
                            )
                        except OSError:
                            continue
                    elif entry.is_dir(follow_symlinks=False):
                        scan_directory(entry.path)
        except (OSError, PermissionError):
            pass
    
    scan_directory(path)
    return results
```