Subject: Re: Fwd: seek64() docs

Re: Fwd: seek64() docs

From: Daniel Stenberg <>
Date: Wed, 18 Sep 2013 22:26:54 +0200 (CEST)

On Wed, 18 Sep 2013, Alexander Lamaison wrote:

> "You MUST NOT seek during writing or reading a file with SFTP, as the
> internals use outstanding packets and changing the "file position" during
> transit will results in badness."
> Now I'm pretty sure that's not right. At least, it's not as broad a
> restriction as we make it sound. After all, if you're not reading or
> writing the file, why would you be seeking at all.
> Perhaps it means during a non-blocking read you must not seek after
> getting an E_AGAIN. from a read/write. Instead you must call the
> read/write again. But that is true of any libssh2 function so why
> call it out here?

I believe that's exactly what that warning is about and yes I agree that we
can probably soften/rephrase that to something better and more helpful.

> Does anyone know what this sentence was really meant to guard against?

I can't recall anything else right now.

Received on 2013-09-18