ADD: WfxDisconnect function

This commit is contained in:
Alexander Koblov 2015-03-07 14:23:21 +00:00
commit ffe4c9223d

View file

@ -150,6 +150,7 @@ type
function WfxRemoveDir(const sDirName: UTF8String): Boolean;
function WfxDeleteFile(const sFileName: UTF8String): Boolean;
function WfxGetLocalName(var sFileName: UTF8String): Boolean;
function WfxDisconnect(const DisconnectRoot: String): Boolean;
public
constructor Create;
destructor Destroy; override;
@ -285,7 +286,8 @@ begin
end;
end;
procedure TWFXModule.WFXStatusInfo(RemoteDir: UTF8String; InfoStartEnd, InfoOperation: Integer);
procedure TWFXModule.WfxStatusInfo(RemoteDir: UTF8String; InfoStartEnd,
InfoOperation: Integer);
begin
if Assigned(FsStatusInfoW) then
FsStatusInfoW(PWideChar(UTF8Decode(RemoteDir)), InfoStartEnd, InfoOperation)
@ -434,6 +436,16 @@ begin
end;
end;
function TWFXModule.WfxDisconnect(const DisconnectRoot: String): Boolean;
begin
if Assigned(FsDisconnectW) then
Result:= FsDisconnectW(PWideChar(UTF8Decode(DisconnectRoot)))
else if Assigned(FsDisconnect) then
Result:= FsDisconnect(PAnsiChar(UTF8ToSys(DisconnectRoot)))
else
Result:= False;
end;
constructor TWFXModule.Create;
begin
inherited;