Created
May 3, 2009 17:55
-
-
Save kyleburton/106079 to your computer and use it in GitHub Desktop.
clojure ftp example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns tiger | |
(:import ( org.apache.commons.net.ftp FTP FTPClient)) | |
(:require [com.github.kyleburton.sandbox.ftp :as ftp]) | |
(:use [ clojure.contrib.str-utils :as str])) | |
(def *tiger-ftp-url* "ftp://anonymous:user%[email protected]/geo/tiger/TIGER2008/") | |
(ftp/list-all *tiger-ftp-url*) | |
(ftp/list-files *tiger-ftp-url*) | |
(ftp/list-directories *tiger-ftp-url*) | |
(ftp/retrieve-file *tiger-ftp-url* "tl_2008_us_nectadiv.zip" "/tmp/tl_2008_us_nectadiv.zip") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment