Feature: Use directory size from server (if provided)

Advertisement

Guest

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 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.

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
40,632
Location:
Prague, Czechia

Re: Feature: Use directory size from server (if provided)

Thanks for your suggestion. Let's see, if there's a more widespread use of the feature first.

Reply with quote

Advertisement

You can post new topics in this forum