Feature: Use directory size from server (if provided)
Currently WinSCP has a feature to manually calculate the size of directories. However, a server is able to provide this info too, even though it might be against any (?) specification.
My use case
I wrote my own FTP server to browse SQLite based file systems and I use WinSCP as the client. I implemented the
For a directory it looks like this, but without the
If I add the
My use case
I wrote my own FTP server to browse SQLite based file systems and I use WinSCP as the client. I implemented the
MLSD
command to list files/directories. For a file, the response might look like this and is already supported:
Type=file;Modify=20230331155201;Create=20230331155201;Size=1234; example.txt
For a directory it looks like this, but without the
Size=
param:
Type=dir;Modify=20230331155201;Create=20230331155201; example-dir
If I add the
Size=
param, WinSCP simply ignores it. So I propose to use this param if provided in the response. Of course, manually calculating the size would still work as usual and simply override any previously stored size.