ADD/StashFS: step-11: addPaths in StashFilesBackend

This commit is contained in:
rich2014 2026-06-05 11:12:18 +08:00
commit a6cdd5849a
2 changed files with 10 additions and 7 deletions

View file

@ -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;

View file

@ -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.