From: "naruse (Yui NARUSE)" Date: 2012-04-04T11:11:22+09:00 Subject: [ruby-core:44118] [ruby-trunk - Feature #5779] Ruby-FTP - allow easy way to find out whether a remote target is a file or a directory Issue #5779 has been updated by naruse (Yui NARUSE). RFC 3659 extends ftp with MLST, the command to show the detail of directories, but it is not widely implemented yet. ---------------------------------------- Feature #5779: Ruby-FTP - allow easy way to find out whether a remote target is a file or a directory https://bugs.ruby-lang.org/issues/5779#change-25645 Author: shevegen (markus heiler) Status: Rejected Priority: Low Assignee: shugo (Shugo Maeda) Category: Target version: Hello. The FTP documentation of Ruby is at: http://www.ruby-doc.org/stdlib-1.9.3/libdoc/net/ftp/rdoc/index.html When you have a local file on your HDD, you can do this: File.directory? '/tmp' # => true File.file? '/etc/ld.so.conf' # => true I propose something like that to be added to the Ruby-FTP library too. So that a user can find out whether something is a file or a directory, without the need to download it, or parse the .list output manually. This is mostly for convenience. -- http://bugs.ruby-lang.org/