www.libssh2.org | Daily snapshots | Mailing list archive | Docs | Examples | github

Archive Index This month's Index

Subject: Fwd: seek64() docs

Fwd: seek64() docs

From: Alexander Lamaison <swish_at_lammy.co.uk>
Date: Wed, 18 Sep 2013 13:34:05 +0100

Just been browsing the docs and came across this on the page for
libssh2_sftp_seek64:

"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?

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

Alex

-- 
Swish - Easy SFTP for Windows Explorer (http://www.swish-sftp.org)
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2013-09-18

the libssh2 team