"Opens a reads a file. Returns the contents as a list of strings"
(let ((lines '()))
(with-open-file (in file :direction :input)
- (let ((eof (gensym)))
- (do ((line (read-line in nil eof)
+ (let ((eof (gensym)))
+ (do ((line (read-line in nil eof)
(read-line in nil eof)))
((eq line eof))
(push line lines)))
new-dir)
:name nil :type nil :version nil :defaults path)
path))))
-
+
(defun probe-directory (filename)
(let ((path (canonicalize-directory-name filename)))
(defun shell-command-output (cmd &key directory whole)
#+allegro (excl.osi:command-output cmd :directory directory :whole whole)
#+sbcl
- (let* ((out (make-array '(0) :element-type 'base-char :fill-pointer 0
+ (let* ((out (make-array '(0) :element-type 'character :fill-pointer 0
:adjustable t))
- (err (make-array '(0) :element-type 'base-char :fill-pointer 0
+ (err (make-array '(0) :element-type 'character :fill-pointer 0
:adjustable t))
- (status
+ (status
(sb-impl::process-exit-code
(with-output-to-string (out-stream out)
(with-output-to-string (err-stream err)
- (sb-ext:run-program
+ (sb-ext:run-program
"/bin/sh"
(list "-c" cmd)
:input nil :output out-stream :error err-stream))))))