Search code examples
ropencpu

Location of temporary files in OpenCPU Single-User Server


I'm beginning to explore OpenCPU via the single-user server on OS X Mavericks, and was wondering where the temporary files are stored. For example, if I run

curl http://localhost:9344/ocpu/library/stats/R/rnorm/ --data n=50

I get notification that the output is available here:

/ocpu/tmp/x0757cc5bd3/R/.val

Which I can view if I direct my browser here:

http://localhost:9344/ocpu/tmp/x0757cc5bd3/R/.val/print

My question is, where is /ocpu/tmp on my machine? There is nothing in my /tmp folder that appears to correspond to the above. Any help/guidance would be greatly appreciated.


Solution

  • I've stumbled upon the answer after incorrectly typing a URL into my browser. The local OpenCPU server maps my temp files onto the following temporary directory:

    /private/var/folders/__/yz_l30s48xj6m_0059b_2twr0000gn/T/ocpu-alexioannides/tmp_library/[your_session_id]