Topic "SetFileValidData, contiguous (non-fragmented) files with no allocation time"

Author Message
cracki
[View user's profile]

Joined: 2011-04-20
Posts: 11
Location: Germany
Hi!

It would be awesome if WinSCP could use this API to tell Windows to allocate a single contiguous file extent. As is, downloaded files can become quite fragmented, e.g. if two files are downloaded in parallel.

The most benefit would be to large files.

https://msdn.microsoft.com/en-us/library/windows/desktop/aa365544.aspx

Another API, SetEndOfFile, would null out the whole file, which would block the call until that is done. SetFileValidData has some security concerns that WinSCP would pay attention to, but it needs zero time to do its magic.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 26462
Location: Prague, Czechia
Thanks for your suggestion. We will consider it.
cracki
[View user's profile]

Joined: 2011-04-20
Posts: 11
Location: Germany
I've just checked something... SetEndOfFile on Win7 seems to be instantaneous too! The whole file appears allocated AND it doesn't need privileges.

it might be sensible to truncate a file to what's really been written.
Advertisements

You can post new topics in this forum






Search

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License