Skip to content

Add FileSystem.lstat support#6428

Draft
coyaSONG wants to merge 1 commit into
Effect-TS:mainfrom
coyaSONG:agent/add-filesystem-lstat
Draft

Add FileSystem.lstat support#6428
coyaSONG wants to merge 1 commit into
Effect-TS:mainfrom
coyaSONG:agent/add-filesystem-lstat

Conversation

@coyaSONG

Copy link
Copy Markdown
Contributor

Type

  • Refactor
  • Feature
  • Bug Fix
  • Optimization
  • Documentation Update

Description

Add FileSystem.lstat so callers can inspect a path without following symbolic links. The shared Node-compatible implementation delegates to node:fs.lstat, reuses the existing File.Info conversion, and is available to both the Node and Bun platform layers.

FileSystem.stat follows a symbolic link and reports information about its target, so Effect callers currently have to leave the portable FileSystem service to distinguish a link from a file or directory. The regression creates a file and symbolic link, verifies that stat reports the target as a file, and verifies that lstat reports the link as SymbolicLink.

The change also adds the corresponding no-op test implementation and a patch changeset for effect and @effect/platform-node-shared.

OpenAI Codex assisted with the implementation and command execution. No human review is claimed.

Validation:

  • Red-first corepack pnpm test packages/platform-node-shared/test/NodeFileSystem.test.ts failed only because fs.lstat was absent; the final focused suite passes 10/10.
  • corepack pnpm lint-fix
  • corepack pnpm check
  • git diff --check

Related

@github-project-automation github-project-automation Bot moved this to Discussion Ongoing in PR Backlog Jul 16, 2026
@IMax153 IMax153 added the 4.0 label Jul 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Discussion Ongoing

Development

Successfully merging this pull request may close these issues.

Add FileSystem.lstat for symlink aware path inspection (node:fs/promises.lstat,)

2 participants