]> gitweb.factorcode.org Git - factor.git/commitdiff
Move walk-dir from id3 to io.paths
authorDoug Coleman <doug.coleman@gmail.com>
Sun, 9 Dec 2007 17:40:47 +0000 (11:40 -0600)
committerDoug Coleman <doug.coleman@gmail.com>
Sun, 9 Dec 2007 17:40:47 +0000 (11:40 -0600)
extra/id3/id3.factor

index f1ef5b7fabaab083dbb19bb16cdcd4438ac4f6d6..1d76bb0a5bce6c33999554ce4dbc8259903ae623 100644 (file)
@@ -2,7 +2,9 @@
 ! See http://factorcode.org/license.txt for BSD license.
 !
 
-USING: arrays combinators io io.binary io.files io.utf16 kernel math math.parser namespaces sequences splitting strings assocs ;
+USING: arrays combinators io io.binary io.files io.paths
+io.utf16 kernel math math.parser namespaces sequences
+splitting strings assocs ;
 
 IN: id3
 
@@ -121,18 +123,6 @@ C: <extended-header> extended-header
 : id3v2 ( filename -- tag/f )
   <file-reader> [ read-tag ] with-stream ;
 
-: append-path ( path files -- paths )
-  [ path+ ] curry* map ;
-
-: get-paths ( dir -- paths )
-  dup directory keys append-path ;
-
-: (walk-dir) ( path -- )
-  dup directory? [ get-paths dup % [ (walk-dir) ] each ] [ drop ] if ;
-
-: walk-dir ( path -- seq )
-  [ (walk-dir) ] { } make ;
-
 : file? ( path -- ? )
   stat 3drop not ;