threadSafeTempFile: Obtain thread-safe temporary file names

Description Usage Arguments Value Author(s) References See Also

Description

This function is a wrapper around tempfile, which creates temporary file names whose path contains the process ID of the calling process. This avoids clashes between threads created by functions such as mclapply (in the “parallel” package), which can easily occur with the standard tempfile function.

Usage

1
threadSafeTempFile(pattern = "file")

Arguments

pattern

Character vector giving the initial part of each file name.

Value

A character vector of temporary file names. No files are actually created.

Author(s)

Jon Clayden

References

Please cite the following reference when using TractoR in your work:

J.D. Clayden, S. Muñoz Maniega, A.J. Storkey, M.D. King, M.E. Bastin & C.A. Clark (2011). TractoR: Magnetic resonance imaging and tractography with R. Journal of Statistical Software 44(8):1-18. http://www.jstatsoft.org/v44/i08/.

See Also

tempfile



Search within the tractor.base package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.