mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
ADD: implement AddSearchPath() in TSearchResultFileSource
This commit is contained in:
parent
fe307c98e4
commit
df9eb65110
1 changed files with 17 additions and 0 deletions
|
|
@ -49,6 +49,8 @@ type
|
|||
|
||||
function GetCustomIcon(const path: String; const iconSize: Integer): TBitmap; override; overload;
|
||||
function GetDisplayFileName(aFile: TFile): String; override;
|
||||
|
||||
procedure AddSearchPath( const startPath: String; paths: TStringList); override;
|
||||
end;
|
||||
|
||||
implementation
|
||||
|
|
@ -162,6 +164,21 @@ begin
|
|||
Result:= aFile.Name;
|
||||
end;
|
||||
|
||||
procedure TSearchResultFileSource.AddSearchPath(
|
||||
const startPath: String;
|
||||
paths: TStringList );
|
||||
var
|
||||
files: TFiles;
|
||||
i: Integer;
|
||||
begin
|
||||
if paths.Count > 0 then
|
||||
Exit;
|
||||
files:= self.GetFiles( self.GetRootDir(EmptyStr) );
|
||||
for i:= 0 to files.Count-1 do
|
||||
paths.Add( files[i].FullPath );
|
||||
files.Free;
|
||||
end;
|
||||
|
||||
initialization
|
||||
searchResultFileSourceProcessor:= TSearchResultFileSourceProcessor.Create;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue