UPD: FindFileEx flags

This commit is contained in:
Alexander Koblov 2018-08-26 12:34:13 +00:00
commit 4e46f33ffa
10 changed files with 14 additions and 14 deletions

View file

@ -158,7 +158,7 @@ var
aFile: TFile;
FindResult: Longint;
begin
FindResult := FindFirstEx(srcPath + '*', faAnyFile, sr);
FindResult := FindFirstEx(srcPath + '*', 0, sr);
try
if FindResult = 0 then
repeat

View file

@ -381,7 +381,7 @@ begin
{$ELSE}
FindResult := FindFirstEx(aFilePath, faAnyFile, SearchRecord);
FindResult := FindFirstEx(aFilePath, 0, SearchRecord);
try
if FindResult <> 0 then
raise EFileNotFound.Create(aFilePath);

View file

@ -33,7 +33,7 @@ var
sr: TSearchRecEx;
begin
try
if FindFirstEx(APath + '*', faAnyFile, sr) = 0 then
if FindFirstEx(APath + '*', 0, sr) = 0 then
repeat
CheckOperationState;
@ -73,7 +73,7 @@ begin
IsRootPath := FileSource.IsPathAtRoot(Path);
Found := FindFirstEx(FFiles.Path + '*', faAnyFile, sr) = 0;
Found := FindFirstEx(FFiles.Path + '*', 0, sr) = 0;
try
if not Found then
begin

View file

@ -175,7 +175,7 @@ procedure FillAndCount(Files: TFiles; CountDirs: Boolean; ExcludeRootDir: Boolea
sr: TSearchRecEx;
aFile: TFile;
begin
if FindFirstEx(srcPath + '*', faAnyFile, sr) = 0 then
if FindFirstEx(srcPath + '*', 0, sr) = 0 then
begin
repeat
if (sr.Name='.') or (sr.Name='..') then Continue;
@ -301,7 +301,7 @@ var
sr: TSearchRecEx;
aFile: TFile;
begin
if FindFirstEx(srcPath + '*', faAnyFile, sr) = 0 then
if FindFirstEx(srcPath + '*', 0, sr) = 0 then
begin
repeat
if (sr.Name = '.') or (sr.Name = '..') then Continue;

View file

@ -275,7 +275,7 @@ procedure FillAndCount(Files: TFiles; out NewFiles: TFiles;
aFolders: TStringList;
begin
aFolders:= TStringList.Create;
if FindFirstEx(srcPath + '*', faAnyFile, sr) = 0 then
if FindFirstEx(srcPath + '*', 0, sr) = 0 then
begin
repeat
if (sr.Name='.') or (sr.Name='..') then Continue;

View file

@ -306,7 +306,7 @@ begin
sPath:= aFileView.CurrentPath + IncludeTrailingPathDelimiter(aFile.Name);
try
if FindFirstEx(sPath + AllFilesMask, faAnyFile, SearchRec) = 0 then
if FindFirstEx(sPath + AllFilesMask, 0, SearchRec) = 0 then
begin
with aFileView do
CurrentPath := CurrentPath + IncludeTrailingPathDelimiter(aFile.Name);

View file

@ -461,7 +461,7 @@ begin
try
slSCFileList.Sorted := True;
Res := FindFirstEx(gpCfgDir + '*.scf', faAnyFile, SR);
Res := FindFirstEx(gpCfgDir + '*.scf', 0, SR);
try
while Res = 0 do
begin

View file

@ -68,7 +68,7 @@ begin
try
lngList.Clear;
DCDebug('Language directory: ' + gpLngDir);
if FindFirstEx(gpLngDir + '*.po', faAnyFile, fr) = 0 then
if FindFirstEx(gpLngDir + '*.po', 0, fr) = 0 then
repeat
sLangName := GetLanguageName(gpLngDir + fr.Name);
LanguageFileList.Add(Format('%s = %s', [sLangName, fr.Name]));

View file

@ -111,7 +111,7 @@ begin
templateDir:= IncludeTrailingPathDelimiter(mbExpandFileName(TrimQuotes(templateDir)));
if mbDirectoryExists(templateDir) then
begin
if FindFirstEx(templateDir, faAnyFile, searchRec) = 0 then
if FindFirstEx(templateDir, 0, searchRec) = 0 then
begin
Items:= TStringList.Create;
repeat
@ -150,7 +150,7 @@ begin
for I:= Low(templateDir) to High(templateDir) do
if mbDirectoryExists(templateDir[I]) then
begin
if FindFirstEx(templateDir[I] + PathDelim + '*.desktop', faAnyFile, searchRec) = 0 then
if FindFirstEx(templateDir[I] + PathDelim + '*.desktop', 0, searchRec) = 0 then
begin
if not Assigned(Items) then Items:= TStringList.Create;
repeat

View file

@ -206,7 +206,7 @@ begin
begin
sPath:= FSelectedFiles[I];
sPath:= ExcludeBackPathDelimiter(sPath);
if FindFirstEx(sPath, faAnyFile, sr) = 0 then
if FindFirstEx(sPath, 0, sr) = 0 then
begin
if FPS_ISDIR(sr.Attr) then
WalkAdr(sPath)
@ -651,7 +651,7 @@ begin
// Search all files to display statistics
Path := IncludeTrailingBackslash(sNewDir) + '*';
if FindFirstEx(Path, faAnyFile, sr) = 0 then
if FindFirstEx(Path, 0, sr) = 0 then
repeat
if not (FPS_ISDIR(sr.Attr) or FileIsLinkToDirectory(sNewDir + PathDelim + sr.Name, sr.Attr)) then
DoFile(sNewDir, sr)