Created
May 8, 2014 09:47
-
-
Save TAKAyukiatkwsk/c8d38bb957020d4e0929 to your computer and use it in GitHub Desktop.
net/ftp でカレントディレクトリのファイル名一覧を取得する
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
require 'net/ftp' | |
# connectionはいい感じに設定する | |
ftp = Net::FTP.new | |
ftp.connect | |
# ファイル名のみを取得する | |
ftp.ls.map {|name| name.split("\s").last } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment