aboutsummaryrefslogtreecommitdiff
path: root/stack-core.el
diff options
context:
space:
mode:
Diffstat (limited to 'stack-core.el')
-rw-r--r--stack-core.el9
1 files changed, 9 insertions, 0 deletions
diff --git a/stack-core.el b/stack-core.el
index 3391d14..fde06a8 100644
--- a/stack-core.el
+++ b/stack-core.el
@@ -245,5 +245,14 @@ entire response as a complex alist."
cons-cell))))
data))))
+(defun stack-cache-get-file (filename)
+ "Return a buffer for FILENAME from `stack-cache-directory'."
+ (let ((find-file-hook nil)
+ (file (expand-file-name filename stack-cache-directory)))
+ (unless (file-exists-p stack-cache-directory)
+ (mkdir stack-cache-directory))
+ (unless (file-exists-p file)
+ (find-file-noselect file))))
+
(provide 'stack-core)
;;; stack-core.el ends here