add a hexdump-file word

db4
Doug Coleman 2009-06-05 22:49:07 -05:00
parent 60a0170e38
commit ce37c8e082
1 changed files with 6 additions and 3 deletions

View File

@ -1,8 +1,8 @@
! Copyright (C) 2008 Doug Coleman.
! See http://factorcode.org/license.txt for BSD license.
USING: arrays io io.streams.string kernel math math.parser
namespaces sequences splitting grouping strings ascii
byte-arrays byte-vectors ;
USING: arrays ascii byte-arrays byte-vectors grouping io
io.encodings.binary io.files io.streams.string kernel math
math.parser namespaces sequences splitting strings ;
IN: tools.hexdump
<PRIVATE
@ -42,3 +42,6 @@ M: byte-vector hexdump. hexdump-bytes ;
: hexdump ( byte-array -- str )
[ hexdump. ] with-string-writer ;
: hexdump-file ( path -- )
binary file-contents hexdump. ;