Re: read the whole file into a string?

Friedrich Dominicus <[email protected]>
Newsgroups gmane.lisp.scheme.scsh
Organization Q Software Solutions GmbH
Message-ID <[email protected]>
check the scsh manual, it's quite useful ;-)

You can try something along this lines:
(let* ((size-of-file (file-size "/home/frido/.zshrc"))
       (fd (open-file "/home/frido/.zshrc" open/read)) 
       (str (read-string size-of-file fd)))
    (display str))

Regards
Friedrich

-- 
Please remove just-for-news- to reply via e-mail.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.