Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
a55efb3b
Kaydet (Commit)
a55efb3b
authored
May 07, 2011
tarafından
Giampaolo Rodola'
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
#11072- applying
http://bugs.python.org/review/11072/show
suggestions
üst
052a899d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
12 deletions
+15
-12
ftplib.rst
Doc/library/ftplib.rst
+8
-8
test_ftplib.py
Lib/test/test_ftplib.py
+7
-4
No files found.
Doc/library/ftplib.rst
Dosyayı görüntüle @
a55efb3b
...
...
@@ -322,13 +322,13 @@ followed by ``lines`` for the text version or ``binary`` for the binary version.
.. method:: FTP.mlsd(path="", facts=[])
List a directory in a standardized format by using MLSD command
(:rfc:`3659`). If *path* is omitted the current directory is assumed.
(:rfc:`3659`).
If *path* is omitted the current directory is assumed.
*facts* is a list of strings representing the type of information desired
(e.g.
*["type", "size", "perm"]*
). Return a generator object yielding a
tuple of two elements for every file found in path. First element is the
file name, the second one is a dictionary
including a variable number of
"facts" depending on the server and whether *facts* argument has been
provided
.
(e.g.
``["type", "size", "perm"]``
). Return a generator object yielding a
tuple of two elements for every file found in path.
First element is the
file name, the second one is a dictionary
containing facts about the file
name. Content of this dictionary might be limited by the *facts* argument
but server is not guaranteed to return all requested facts
.
.. versionadded:: 3.3
...
...
@@ -340,7 +340,7 @@ followed by ``lines`` for the text version or ``binary`` for the binary version.
directory). Multiple arguments can be used to pass non-standard options to
the ``NLST`` command.
.. deprecated:: 3.3 use :meth:`mlsd` instead
.. deprecated:: 3.3 use :meth:`mlsd` instead
.
.. method:: FTP.dir(argument[, ...])
...
...
@@ -352,7 +352,7 @@ followed by ``lines`` for the text version or ``binary`` for the binary version.
as a *callback* function as for :meth:`retrlines`; the default prints to
``sys.stdout``. This method returns ``None``.
.. deprecated:: 3.3 use :meth:`mlsd` instead
.. deprecated:: 3.3 use :meth:`mlsd` instead
.
.. method:: FTP.rename(fromname, toname)
...
...
Lib/test/test_ftplib.py
Dosyayı görüntüle @
a55efb3b
...
...
@@ -586,10 +586,12 @@ class TestFTPClass(TestCase):
ls
=
list
(
self
.
client
.
mlsd
())
for
name
,
facts
in
ls
:
self
.
assertIsInstance
(
name
,
str
)
self
.
assertIsInstance
(
facts
,
dict
)
self
.
assertTrue
(
name
)
self
.
assert
True
(
'type'
in
facts
)
self
.
assert
True
(
'perm'
in
facts
)
self
.
assert
True
(
'unique'
in
facts
)
self
.
assert
In
(
'type'
,
facts
)
self
.
assert
In
(
'perm'
,
facts
)
self
.
assert
In
(
'unique'
,
facts
)
def
set_data
(
data
):
self
.
server
.
handler_instance
.
next_data
=
data
...
...
@@ -626,7 +628,8 @@ class TestFTPClass(TestCase):
# case sensitiveness
set_data
(
'Type=type;TyPe=perm;UNIQUE=unique; name
\r\n
'
)
_name
,
facts
=
next
(
self
.
client
.
mlsd
())
[
self
.
assertTrue
(
x
.
islower
())
for
x
in
facts
.
keys
()]
for
x
in
facts
:
self
.
assertTrue
(
x
.
islower
())
# no data (directory empty)
set_data
(
''
)
self
.
assertRaises
(
StopIteration
,
next
,
self
.
client
.
mlsd
())
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment