EldoS | Feel safer!

Software components for data protection, secure storage and transfer

SFTP Symlink access

Also by EldoS: Callback File System
Create virtual file systems and disks, expose and manage remote data as if they were files on the local disk.
#11973
Posted: 12/19/2009 08:19:03
by Claudiu Popescu (Basic support level)
Joined: 12/18/2009
Posts: 6

VCL edition, I'm using RAD Studio 2010 (Delphi).
#11974
Posted: 12/19/2009 09:41:11
by Ken Ivanov (EldoS Corp.)

Unfortunately, it is technically impossible to provide a quick fix for VCL edition evaluation. Please use lower-level file reading methods for zero-size files instead until the fix is available:
Code
var
  Buf : array[0..65535] of byte;
  Handle : BufferType;
  ReqSize, Sz : integer;
  Offset : int64;
...
Client.PipelineLength := 1;
Client.AutoAdjustTransferBlock := false;
Handle := Client.OpenFile(<RemoteFileName>, [SBSftpCommon.fmRead], TElSftpFileAttributes(nil));
if (Handle <> '') then
begin
  Offset := 0;
  while true do
  begin
    ReqSize := 65536;
    Sz := Client.Read(Handle, Offset, @Buf[0], ReqSize);
    Inc(Offset, Sz);
    if Sz = 0 then
      Break;
  end;
end;
Client.CloseHandle(Handle);

Reply

Statistics

Topic viewed 3568 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!