Opened 9 months ago

Last modified 4 months ago

#119 new enhancement

support for the Pathlib

Reported by: ftputiluser Owned by: schwa
Priority: major Milestone:
Component: Library Version:
Keywords: Cc:

Description (last modified by schwa)

It will be very useful to have a support for the Pathlib acts like input parameters for methods. E.g. you can do something like ftp_host.chdir(Path("/my/dir/"))

Change History (2)

comment:1 Changed 9 months ago by schwa

Generally, this sounds like a sensible idea. However, according to the documentation at , Path(...) instantiates a filesystem path for the operating system the Python process runs on.

A path object to be used as an FTP remote path should probably be an FTPPath (or something with a similar name). I'm not sure yet how to implement this. From a pure implementation perspective, an FTPPath could be aliased to a PurePosixPath, but having isinstance(FTPPath(...), PurePosixPath) evaluate to True would be confusing. Although most FTP servers will run on a Posix system, an FTPPath shouldn't assume this. Also, some PurePosixPath operations may not make sense for a remote filesystem.

comment:2 Changed 4 months ago by schwa

Description: modified (diff)
Note: See TracTickets for help on using tickets.