code: public static Closeable mountTemp(VirtualFile mountPoint, TempFileProvider tempFileProvider) throws IOException {
          boolean ok = false;
          final TempDir tempDir = tempFileProvider.createTempDir("tmpfs");
          try {
              final MountHandle handle = doMount(new RealFileSystem(tempDir.getRoot()), mountPoint, tempDir);
              ok = true;
              return handle;
          } finally {
              if (!ok) {
                  VFSUtils.safeClose(tempDir);
              }
          }
      }
docs: Create and mount a temporary file system, returning a single handle which will unmount and close the filesystem
  when closed.
  
  @param mountPoint       the point at which the filesystem should be mounted
  @param tempFileProvider the temporary file provider
  @return a handle
  @throws IOException if an error occurs