MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / dir

Method dir

tools/python-3.11.9-amd64/Lib/ftplib.py:556–569  ·  view source on GitHub ↗

List a directory in long form. By default list current directory to stdout. Optional last argument is callback function; all non-empty arguments before it are concatenated to the LIST command. (This *should* only be used for a pathname.)

(self, *args)

Source from the content-addressed store, hash-verified

554 return files
555
556 def dir(self, *args):
557 '''List a directory in long form.
558 By default list current directory to stdout.
559 Optional last argument is callback function; all
560 non-empty arguments before it are concatenated to the
561 LIST command. (This *should* only be used for a pathname.)'''
562 cmd = 'LIST'
563 func = None
564 if args[-1:] and type(args[-1]) != type(''):
565 args, func = args[:-1], args[-1]
566 for arg in args:
567 if arg:
568 cmd = cmd + (' ' + arg)
569 self.retrlines(cmd, func)
570
571 def mlsd(self, path="", facts=[]):
572 '''List a directory in a standardized format by using MLSD

Callers 1

testFunction · 0.95

Calls 2

retrlinesMethod · 0.95
typeClass · 0.50

Tested by

no test coverage detected