mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
ADD/StashFS: step-11: addPaths in StashFilesBackend
This commit is contained in:
parent
0a146e0119
commit
a6cdd5849a
2 changed files with 10 additions and 7 deletions
|
|
@ -22,6 +22,7 @@ type
|
|||
procedure removePath( const path: String );
|
||||
procedure clear;
|
||||
function count: Integer;
|
||||
procedure addPaths( const files: TFiles );
|
||||
procedure removePaths( const files: TFiles );
|
||||
function toFiles: TFiles;
|
||||
end;
|
||||
|
|
@ -69,6 +70,14 @@ begin
|
|||
Result:= _paths.Count;
|
||||
end;
|
||||
|
||||
procedure TStashFilesBackend.addPaths(const files: TFiles);
|
||||
var
|
||||
i: Integer;
|
||||
begin
|
||||
for i:= 0 to files.Count-1 do
|
||||
self.addPath( files[i].FullPath );
|
||||
end;
|
||||
|
||||
procedure TStashFilesBackend.removePaths(const files: TFiles);
|
||||
var
|
||||
i: Integer;
|
||||
|
|
|
|||
|
|
@ -38,14 +38,8 @@ end;
|
|||
{ TStashCopyInOperation }
|
||||
|
||||
procedure TStashCopyInOperation.MainExecute;
|
||||
var
|
||||
i: Integer;
|
||||
f: TFile;
|
||||
begin
|
||||
for i:= 0 to SourceFiles.Count-1 do begin
|
||||
f:= SourceFiles[i];
|
||||
stashFilesBackend.addPath( f.FullPath );
|
||||
end;
|
||||
stashFilesBackend.addPaths( SourceFiles );
|
||||
end;
|
||||
|
||||
end.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue