mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-08 04:35:57 +02:00
parent
28eed0f0fe
commit
c940e1fe2f
@ -473,16 +473,8 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
function DirPathExists(DirectoryName: string): boolean;
|
function DirPathExists(DirectoryName: string): boolean;
|
||||||
var sr: TSearchRec;
|
|
||||||
begin
|
begin
|
||||||
if (DirectoryName<>'')
|
Result:=Sysutils.DirectoryExists(ChompPathDelim(DirectoryName));
|
||||||
and (DirectoryName[length(DirectoryName)]=PathDelim) then
|
|
||||||
DirectoryName:=copy(DirectoryName,1,length(DirectoryName)-1);
|
|
||||||
if FindFirst(DirectoryName,faAnyFile,sr)=0 then
|
|
||||||
Result:=((sr.Attr and faDirectory)>0)
|
|
||||||
else
|
|
||||||
Result:=false;
|
|
||||||
FindClose(sr);
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function ForceDirectory(DirectoryName: string): boolean;
|
function ForceDirectory(DirectoryName: string): boolean;
|
||||||
|
Loading…
Reference in New Issue
Block a user