giampaolo / pyftpdlib

Extremely fast and scalable Python FTP server library
MIT License
1.65k stars 267 forks source link

Creating FTP Virtual Directories #503

Closed huyidao625 closed 5 years ago

huyidao625 commented 5 years ago

Hi Giampaolo:

How to create FTP virtual directory?Does it support FTP virtual directories?

Like this : Creating FTP Virtual Directories

thanks

giampaolo commented 5 years ago

I don't know what that MS page talks about (it looks quite old / no longer maintained). What I can tell you is that by default pyftpdlib provides AbstractedFS, which interacts with the real filesytem (a "disk") and nothing else, so whatever a virtual directory is you'll have to implement it from scratch. =)

lurch commented 5 years ago

Having had a quick look at the AbstractedFS code, my naive guess is that it might be possible to do what you want by simply creating a subclass of AbstractedFS and just overriding the "Pathname / conversion utilities" i.e. ftpnorm, ftp2fs, fs2ftp & validpath ?