]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/http/download/download.factor
http.download: fix for new changes
[factor.git] / basis / http / download / download.factor
index 1f54064206e2a4fa32c252e22cc8d68044244e34..df9fca6e593a0b9059b20c90f1deb9974c0563ec 100644 (file)
@@ -1,9 +1,10 @@
 ! Copyright (C) 2024 Doug Coleman.
 ! See https://factorcode.org/license.txt for BSD license.
 USING: accessors calendar checksums combinators.short-circuit
-http.client io io.backend io.directories io.encodings.binary
-io.files io.files.info io.files.unique io.pathnames kernel math
+http.client io io.directories io.encodings.binary io.files
+io.files.info io.files.unique io.pathnames kernel math
 math.order math.parser present sequences shuffle splitting ;
+
 IN: http.download
 
 : file-too-old-or-not-exists? ( file duration -- ? )
@@ -87,6 +88,9 @@ PRIVATE>
 : download-once-to ( url file -- path )
     dup file-exists? [ nip ] [ download-to ] if ;
 
+: download-once ( url -- path )
+    dup download-name download-once-to ;
+
 : download-outdated-to ( url file duration -- path )
     2dup delete-when-old [ drop download-to ] [ drop nip ] if ;