Prechádzať zdrojové kódy

Merge branch source:main into main

Curtis Hamilton 2 týždňov pred
rodič
commit
b9223f595f

+ 1 - 1
compiler/options.pas

@@ -2219,7 +2219,7 @@ begin
 
   { monitor support? }
   if not(target_info.system in systems_aix+systems_bsd+systems_linux+
-    systems_nativent+systems_solaris+systems_wasm+systems_all_windows) then
+    systems_nativent+systems_solaris+systems_wasm+systems_all_windows+systems_darwin) then
     Include(target_unsup_features,f_monitor);
 
   if def then

+ 6 - 0
packages/vcl-compat/src/system.ioutils.pp

@@ -228,6 +228,7 @@ type
     class function GetRingtonesPath: string; static;
     class function GetSharedRingtonesPath: string; static;
     class function GetTemplatesPath: string;
+    class function Exists(const aPath: string; aFollowLink: Boolean = True): Boolean; static;
     class function GetAttributes(const aPath: string; aFollowLink: Boolean = True): TFileAttributes; static;
     class procedure SetAttributes(const aPath: string; const aAttributes: TFileAttributes); static;
     class function HasExtension(const aPath: string): Boolean; static;
@@ -1513,6 +1514,11 @@ begin
 
 end;
 
+class function TPath.Exists(const aPath: string; aFollowLink: Boolean): Boolean;
+begin
+  Result:=TDirectory.Exists(aPath, aFollowLink) and TFile.Exists(aPath, aFollowLink);
+end;
+
 class function TPath.GetAttributes(const aPath: string; aFollowLink: Boolean
   ): TFileAttributes;
 begin