Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我开始使用 google jimfs 并执行 ls 我在 FS 的根目录中找到了工作目录。这个文件夹的目的是什么?
它只是一个任意目录,因此工作目录(解析相对路径的目录)不是根目录,因为它通常不在实际情况下。您可以通过自定义Configuration. 这是将工作目录设置为根目录的示例(在这种情况下,/work不会创建目录):
Configuration
/work
Configuration config = Configuration.unix().toBuilder() .setWorkingDirectory("/") .build();