projects
/
kmrcl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
r9971: fix package name
[kmrcl.git]
/
os.lisp
diff --git
a/os.lisp
b/os.lisp
index 5b6fff3aa3d90aad02dd8ce57fa88f25c0560f87..5bbfbfa4f2fbca3ff430e88dd14c9a10df46133b 100644
(file)
--- a/
os.lisp
+++ b/
os.lisp
@@
-60,7
+60,8
@@
returns (VALUES string-output error-output exit-status)"
(let ((status
(system:call-system-showing-output
command
(let ((status
(system:call-system-showing-output
command
- :shell-type "/bin/sh"
+ :prefix ""
+ :show-cmd nil
:output-stream output)))
(values (get-output-stream-string output) nil status))
(close output)))
:output-stream output)))
(values (get-output-stream-string output) nil status))
(close output)))
@@
-119,7
+120,9
@@
returns (VALUES output-string pid)"
(system:call-system-showing-output
command
:shell-type "/bin/sh"
(system:call-system-showing-output
command
:shell-type "/bin/sh"
- :output-stream output)
+ :show-cmd nil
+ :prefix ""
+ :output-stream nil)
#+clisp ;XXX not exactly *verbose-out*, I know
(ext:run-shell-command command :output :terminal :wait t)
#+clisp ;XXX not exactly *verbose-out*, I know
(ext:run-shell-command command :output :terminal :wait t)
@@
-148,3
+151,10
@@
returns (VALUES output-string pid)"
(command-output cmd)))
((eq if-does-not-exist :error)
(error "Directory ~A does not exist [delete-directory-and-files]." dir))))
(command-output cmd)))
((eq if-does-not-exist :error)
(error "Directory ~A does not exist [delete-directory-and-files]." dir))))
+
+(defun file-size (file)
+ #+allegro (let ((stat (excl.osi:stat (namestring file))))
+ (excl.osi:stat-size stat))
+ #-allegro
+ (with-open-file (in file :direction :input)
+ (file-length in)))