mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
ADD: SFTP - Execute command from command line
This commit is contained in:
parent
3cd3b151bf
commit
2ffe64fe45
2 changed files with 3 additions and 10 deletions
|
|
@ -151,9 +151,8 @@ function TScpSend.OpenChannel: Boolean;
|
|||
begin
|
||||
repeat
|
||||
FChannel := libssh2_channel_open_session(FSession);
|
||||
if Assigned(FChannel) then
|
||||
libssh2_channel_set_blocking(FChannel, 0)
|
||||
else begin
|
||||
if not Assigned(FChannel) then
|
||||
begin
|
||||
FLastError:= libssh2_session_last_errno(FSession);
|
||||
if (FLastError <> LIBSSH2_ERROR_EAGAIN) then Exit(False);
|
||||
end;
|
||||
|
|
|
|||
|
|
@ -50,7 +50,6 @@ type
|
|||
function CreateDir(const Directory: string): Boolean; override;
|
||||
function DeleteDir(const Directory: string): Boolean; override;
|
||||
function DeleteFile(const FileName: string): Boolean; override;
|
||||
function ExecuteCommand(const Command: String): Boolean; override;
|
||||
function ChangeWorkingDir(const Directory: string): Boolean; override;
|
||||
function RenameFile(const OldName, NewName: string): Boolean; override;
|
||||
function ChangeMode(const FileName, Mode: String): Boolean; override;
|
||||
|
|
@ -171,11 +170,6 @@ begin
|
|||
Result:= libssh2_sftp_unlink(FSFTPSession, PAnsiChar(FileName)) = 0;
|
||||
end;
|
||||
|
||||
function TSftpSend.ExecuteCommand(const Command: String): Boolean;
|
||||
begin
|
||||
Result:= False;
|
||||
end;
|
||||
|
||||
function TSftpSend.ChangeWorkingDir(const Directory: string): Boolean;
|
||||
var
|
||||
Attributes: LIBSSH2_SFTP_ATTRIBUTES;
|
||||
|
|
@ -368,7 +362,7 @@ begin
|
|||
FindRec.Handle:= Result;
|
||||
FsFindNextW(FindRec, FindData);
|
||||
Result:= FindRec;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
function TSftpSend.FsFindNextW(Handle: Pointer; var FindData: TWin32FindDataW): BOOL;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue