Skip to content

Commit b95adcb

Browse files
committed
Add some more examples opening a FTPFS in fs.ftpfs module
1 parent 64ba8ce commit b95adcb

1 file changed

Lines changed: 9 additions & 5 deletions

File tree

fs/ftpfs.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -363,17 +363,21 @@ class FTPFS(FS):
363363
Create with the constructor::
364364
365365
>>> from fs.ftpfs import FTPFS
366-
>>> ftp_fs = FTPFS()
366+
>>> ftp_fs = FTPFS("demo.wftpserver.com")
367367
368368
Or via an FS URL::
369369
370-
>>> import fs
371-
>>> ftp_fs = fs.open_fs('ftp://')
370+
>>> ftp_fs = fs.open_fs('ftp://test.rebex.net')
372371
373372
Or via an FS URL, using TLS::
374373
375-
>>> import fs
376-
>>> ftp_fs = fs.open_fs('ftps://')
374+
>>> ftp_fs = fs.open_fs('ftps://demo.wftpserver.com')
375+
376+
You can also use a non-anonymous username, and optionally a
377+
password, even within a FS URL::
378+
379+
>>> ftp_fs = FTPFS("test.rebex.net", user="demo", passwd="password")
380+
>>> ftp_fs = fs.open_fs('ftp://demo:password@test.rebex.net')
377381
378382
"""
379383

0 commit comments

Comments
 (0)