# Net/ftp

**URL:** <https://www.ruby-forum.com/t/net-ftp/166401>\
**Category:** Ruby\
**Created:** [April 24, 2009, 8:19pm UTC](https://www.ruby-forum.com/t/net-ftp/166401 "2009-04-24T20:19:16Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![joeg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/dc4da7/32.png) [@joeg](https://www.ruby-forum.com/u/joeg)\
**Post date:** [April 24, 2009, 8:19pm UTC](https://www.ruby-forum.com/t/net-ftp/166401/1 "2009-04-24T20:19:16Z")

</div>

There’s a method in Ruby’s net/ftp library called list/ls. Does anyone  
have a list (or can someone point me to a place that has a list) of all  
possible arguments that you can pass to ls?

–  
Joseph Gutierrez  
Web D. - Inc21  
removed\_email\_address@domain.invalid

---

<div class="post-metadata">

**Author:** ![joeg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/dc4da7/32.png) [@joeg](https://www.ruby-forum.com/u/joeg)\
**Post date:** [April 24, 2009, 9:46pm UTC](https://www.ruby-forum.com/t/net-ftp/166401/2 "2009-04-24T21:46:07Z")

</div>

On Fri, Apr 24, 2009 at 7:14 PM, Joe G. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> ## There’s a method in Ruby’s net/ftp library called list/ls. Does anyone have a list (or can someone point me to a place that has a list) of all possible arguments that you can pass to ls?
> 
> Joseph Gutierrez

You can pass anything you want as it isn’t checked. I don’t think the  
FTP  
protocol actually specifies any arguments for LIST/LS. If you’re asking  
which arguments are going to actually produce a meaningful result, I’m  
not  
sure where to point you.

Regards,  
Ben

---

<div class="post-metadata">

**Author:** ![joeg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/dc4da7/32.png) [@joeg](https://www.ruby-forum.com/u/joeg)\
**Post date:** [April 25, 2009, 9:21pm UTC](https://www.ruby-forum.com/t/net-ftp/166401/3 "2009-04-25T21:21:10Z")

</div>

On 24 Apr, 21:45, Ben L. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> protocol actually specifies any arguments for LIST/LS. If you’re asking  
> which arguments are going to actually produce a meaningful result, I’m not  
> sure where to point you.
> 
> Regards,  
> Ben

FTP’s LIST, NLST, MLSD and MLST commands accept an argument which  
represents the _path_.  
If you send something like “LIST foo” the content of the directory  
“foo” will be returned.

— Giampaolo

> **[GitHub - giampaolo/pyftpdlib: Extremely fast and scalable Python FTP server...](https://github.com/giampaolo/pyftpdlib)**
>
> Extremely fast and scalable Python FTP server library - GitHub - giampaolo/pyftpdlib: Extremely fast and scalable Python FTP server library

---

<div class="post-metadata">

**Author:** ![joeg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/dc4da7/32.png) [@joeg](https://www.ruby-forum.com/u/joeg)\
**Post date:** [April 25, 2009, 9:29pm UTC](https://www.ruby-forum.com/t/net-ftp/166401/4 "2009-04-25T21:29:22Z")

</div>

On Sat, Apr 25, 2009 at 8:20 PM, Giampaolo Rodola’ [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> > > –
> 
> FTP’s LIST, NLST, MLSD and MLST commands accept an argument which  
> represents the _path_.  
> If you send something like “LIST foo” the content of the directory  
> “foo” will be returned.
> 
> — Giampaolo  
> [http://code.google.com/p/pyftpdlib/](http://code.google.com/p/pyftpdlib/)

Of course it does. I should have been clearer in my response 🙂 Apart  
from  
the obvious path argument, I’m not aware of any others 😉

Ben
