 
   (stat
     [this id]
-    (when-block-file this id
+    (when-block id
       (block-stats id file)))
 
 


  (delete!
    [this id]
    (when-block-file this id
      (.delete file))))



    (file-stats file)))


(defmacro ^:private when-block
  "An anaphoric macro which binds the block file to `file` and executes `body`
  only if it exists. Assumes that the root directory is bound to `root`."
  [id & body]
  `(let [~(with-meta 'file {:tag 'java.io.File})
         (id->file ~'root ~id)]
     (when (.exists ~'file)
       ~@body)))

