+ // Touch() must be called before calling Write() on a block. Touch()
+ // also uses lockfile(). This avoids a race condition between Write()
+ // and Delete() because either (a) the file will be deleted and Touch()
+ // will signal to the caller that the file is not present (and needs to
+ // be re-written), or (b) Touch() will update the file's timestamp and
+ // Delete() will read the correct up-to-date timestamp and choose not to
+ // delete the file.
+
+ if v.readonly {
+ return MethodDisabledError
+ }