 if (entry) {
          const isDir = entry.directory
          return createStats(
            isDir ? 'dir' : 'file',
            isDir ? 0o40755 : 0o100644,
            entry.data ? entry.data.length : 0
          )
        }

        // Check if it's a directory by looking for files that start with this path
        const dirPath = normalizedPath.endsWith('/') ? normalizedPath : normalizedPath + '/'
        const hasChildren = Array.from(this.entries.keys()).some(key =>
          key.startsWith(dirPath)