MCPcopy Index your code
hub / github.com/python/cpython / nlst

Method nlst

Lib/ftplib.py:541–548  ·  view source on GitHub ↗

Return a list of files in a given directory (default the current).

(self, *args)

Source from the content-addressed store, hash-verified

539 return self.voidcmd(cmd)
540
541 def nlst(self, *args):
542 '''Return a list of files in a given directory (default the current).'''
543 cmd = 'NLST'
544 for arg in args:
545 cmd = cmd + (' ' + arg)
546 files = []
547 self.retrlines(cmd, files.append)
548 return files
549
550 def dir(self, *args):
551 '''List a directory in long form.

Callers 1

test_nlstMethod · 0.80

Calls 1

retrlinesMethod · 0.95

Tested by 1

test_nlstMethod · 0.64