Changeset 32599 in project


Ignore:
Timestamp:
07/15/15 02:27:02 (5 years ago)
Author:
Ivan Raikov
Message:

first attempt at providing a mode argument to file->byte-blob

File:
1 edited

Legend:

Unmodified
Added
Removed
  • release/4/byte-blob/trunk/byte-blob.scm

    r32385 r32599  
    427427
    428428       
    429 (define (file->byte-blob filename . rest)
     429(define (file->byte-blob filename #!optional mode)
    430430  (let ((filesize (file-size filename)))
    431     (call-with-input-file filename
    432       (lambda (port) (byte-blob-read port filesize)))))
     431    (if mode
     432        (call-with-input-file filename
     433          (lambda (port) (byte-blob-read port filesize))
     434          mode)
     435        (call-with-input-file filename
     436          (lambda (port) (byte-blob-read port filesize)))
     437        ))
     438  )
    433439
    434440
Note: See TracChangeset for help on using the changeset viewer.