> For the complete documentation index, see [llms.txt](https://book.bsdcn.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://book.bsdcn.org/man/man9/pseudofs.9.md).

# pseudofs.9

`pseudofs` — 伪文件系统构建工具包

## 名称

`pseudofs`

## 概要

```c
#include <fs/pseudofs/pseudofs.h>
```

## 描述

`pseudofs` 模块为伪文件系统（如 [procfs(4)](/man/man4/procfs.4.md) 和 [linprocfs(4)](/man/man4/linprocfs.4.md)）提供了抽象 API。它负责处理所有复杂的细节，如与 VFS 系统交互、强制访问控制、跟踪文件号，以及克隆特定于进程的文件和目录。消费者模块（即实现文件系统实际核心的模块）只需提供目录结构（由 `pseudofs` 提供的宏声明和初始化的结构集合表示）以及报告文件属性或将实际文件内容写入 sbuf 的回调函数。

## 参见

[linprocfs(4)](/man/man4/linprocfs.4.md), [linsysfs(4)](/man/man4/linsysfs.4.md), [procfs(4)](/man/man4/procfs.4.md), [sbuf(9)](/man/man9/sbuf.9.md), [vnode(9)](/man/man9/vnode.9.md)

## 历史

`pseudofs` 模块首次出现在 FreeBSD 5.0 中。

## 作者

`pseudofs` 模块和本手册页由 Dag-Erling Smørgrav <des@FreeBSD.org> 编写。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://book.bsdcn.org/man/man9/pseudofs.9.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
