From 40ecb11adeba25b7c2776480c729287664ab5ef3 Mon Sep 17 00:00:00 2001 From: Antoine Pelisse Date: Mon, 14 Aug 2017 10:29:00 -0700 Subject: [PATCH] Document TempDir parameter --- diskv.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/diskv.go b/diskv.go index 2fa0b5a..524dc0a 100644 --- a/diskv.go +++ b/diskv.go @@ -46,7 +46,12 @@ type Options struct { CacheSizeMax uint64 // bytes PathPerm os.FileMode FilePerm os.FileMode - TempDir string + // If TempDir is set, it will enable filesystem atomic writes by + // writing temporary files to that location before being moved + // to BasePath. + // Note that TempDir MUST be on the same device/partition as + // BasePath. + TempDir string Index Index IndexLess LessFunction