Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(syscall):【任务发布】添加 newfstatat 系统调用 #982

Open
val213 opened this issue Oct 16, 2024 · 0 comments
Open

feat(syscall):【任务发布】添加 newfstatat 系统调用 #982

val213 opened this issue Oct 16, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@val213
Copy link
Collaborator

val213 commented Oct 16, 2024

newfstatat 提供了获取文件或目录状态信息的能力,包括文件类型、大小、权限等。它支持通过文件描述符来指定路径,这使得它能够处理相对路径,并且可以控制是否跟随符号链接。

在执行 cp -r 命令时,newfstatat 被用来获取源目录和文件的状态信息,以便在目标位置创建具有相同属性的文件或目录。例如,如果需要复制一个文件 src/file,newfstatat 会获取该文件的属性,然后 cp -r 会使用这些属性在目标位置 dest/file 创建一个具有相同属性的新文件。此外,newfstatat 也用于检查路径是否存在以及是否是符号链接,这对于递归复制目录结构非常关键。

@val213 val213 added the enhancement New feature or request label Oct 16, 2024
@dragonosbot dragonosbot added the needs-triage 这个问题可能需要分类处理。如果已经完成分类,请移除它。 label Oct 16, 2024
@fslongjin fslongjin removed the needs-triage 这个问题可能需要分类处理。如果已经完成分类,请移除它。 label Oct 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants