mirror of
https://github.com/rabbibotton/clog.git
synced 2025-12-06 10:40:45 -08:00
recursive search done
This commit is contained in:
parent
81753f5b1b
commit
03f1d74e89
2 changed files with 6 additions and 5 deletions
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
;; Local file utilities
|
||||
|
||||
(defun read-file (infile &key clog-obj if-does-not-exist)
|
||||
(defun read-file (infile &key clog-obj (report-errors t) if-does-not-exist)
|
||||
"Read local file named INFILE"
|
||||
(handler-case
|
||||
(with-open-file (instream infile :direction :input :if-does-not-exist if-does-not-exist)
|
||||
|
|
@ -12,9 +12,10 @@
|
|||
(pos (read-sequence string instream)))
|
||||
(subseq string 0 pos))))
|
||||
(error (condition)
|
||||
(if clog-obj
|
||||
(alert-toast clog-obj "File Error" (format nil "Error: ~A" condition))
|
||||
(format t "Error: ~A" condition))
|
||||
(when report-errors
|
||||
(if clog-obj
|
||||
(alert-toast clog-obj "File Error" (format nil "Error: ~A" condition))
|
||||
(format t "Error: ~A" condition)))
|
||||
nil)))
|
||||
|
||||
(defun write-file (string outfile &key clog-obj (action-if-exists :rename))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue