JimFS: what is the purpose of /work directory

613 Views Asked by At

I started to use google jimfs and doing ls I found there work directory in the root of FS. What is the purpose of this folder?

1

There are 1 best solutions below

0
On BEST ANSWER

It's just an arbitrary directory so that the working directory (the directory that relative paths are resolved against) isn't the root directory, since it typically isn't in real situations. You can change the working directory to whatever you want (including the root) by customizing the Configuration. Here's an example of setting the working directory to the root (in which case the /work directory won't be created):

Configuration config = Configuration.unix().toBuilder()
    .setWorkingDirectory("/")
    .build();