Re: Is there an efficient way to get file length w/o reading file?
- From: Zach Beane <xach@xxxxxxxx>
- Date: Wed, 13 Apr 2005 16:19:15 -0400
Jeffrey Cunningham <jeffrey.k.cunningham@xxxxxxxxxx> writes:
> I started to wonder if it was possible to do this in CL without
> having to actually read each file to determine it's length.
Have you considered FILE-LENGTH?
I've used something like the following:
(defun file-length-in-bytes (file)
(with-open-file (stream file :direction :input
:element-type '(unsigned-byte 8))
(file-length stream)))
Zach
.
- Prev by Date: First shot at lisp mini-app - How to make it lispy and not lisp-c
- Next by Date: Re: Comparing Lisp conditions to Java Exceptions
- Previous by thread: First shot at lisp mini-app - How to make it lispy and not lisp-c
- Next by thread: Re: Is there an efficient way to get file length w/o reading file?
- Index(es):