Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

filesystem: document hard-link behavior and report the link count in get_file_info

Abierto
#5,226 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
72/100
Tipo de issue
Nueva funcionalidad
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
node.js, typescript

Línea de trabajo

Start with src/filesystem/README.md around line 106 and the filesystem server implementation of get_file_info. Check how write_file and edit_file handle existing files, then find the fs.stat result used for file information. Add the README explanation, expose nlink, and cover the field in tests; the changeset should describe the new output field.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

enhancement server-filesystem v2

The filesystem server's README should spell out what hard links mean for reads and writes, and get_file_info should report a file's link count.

Problem

write_file and edit_file overwrite an existing file in place, and the README says so (src/filesystem/README.md:106: the file "keeps its inode, creation time, hard links and permissions"). It does not spell out the consequence: when a file inside an allowed directory is a hard link to a file elsewhere, both names are the same file, so an overwrite changes the content seen at every name, and a read returns that shared content. Some tools create hard links routinely (pnpm's content-addressable store, for example, hard-links package files into node_modules), so this can happen without anyone choosing it.

The server cannot currently tell a caller whether a file has other names: get_file_info does not report the link count.

Expected

  1. A README paragraph, under write_file (or in a short note on allowed directories), saying that the server's allowed-directory checks are path-based, that a hard link is a real name of the same file, and that overwriting or editing such a file changes it at all of its names.
  2. get_file_info reports the link count (nlink from fs.stat), so a client or model can see that a file has more than one name before changing it.

Tests for the new get_file_info field, and a changeset (minor: a new output field).

Lenguaje dominante
TypeScript
Estrellas
91.4k
Forks
11.8k
Merge medio
6 h 37 min
PR fusionados (30 d)
147

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de modelcontextprotocol/servers

Todos los issues de modelcontextprotocol/servers

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.