|
@@ -199,8 +199,10 @@ type
|
|
|
class function GetTempPath: string;
|
|
|
class function GetHomePath: string;
|
|
|
class function GetDocumentsPath: string;
|
|
|
+ class function GetDesktopPath: string;
|
|
|
class function GetSharedDocumentsPath: string;
|
|
|
class function GetLibraryPath: string;
|
|
|
+ class function GetAppPath: string;
|
|
|
class function GetCachePath: string;
|
|
|
class function GetPublicPath: string;
|
|
|
class function GetPicturesPath: string;
|
|
@@ -1139,6 +1141,20 @@ begin
|
|
|
{$ENDIF}
|
|
|
end;
|
|
|
|
|
|
+class function TPath.GetDesktopPath: string;
|
|
|
+begin
|
|
|
+ Result:='';
|
|
|
+ {$IfDef MSWINDOWS}
|
|
|
+ Result:=GetWindowsSpecialDir(CSIDL_DESKTOPDIRECTORY, False);
|
|
|
+ {$ELSE}
|
|
|
+ {$IFDEF UNIX}
|
|
|
+ Result:=GetSpecialDir(sdDesktop);
|
|
|
+ {$ELSE}
|
|
|
+ Result:=GetUserDir;
|
|
|
+ {$ENDIF}
|
|
|
+ {$EndIf}
|
|
|
+end;
|
|
|
+
|
|
|
class function TPath.GetSharedDocumentsPath: string;
|
|
|
begin
|
|
|
Result:='';
|
|
@@ -1162,6 +1178,11 @@ begin
|
|
|
{$ENDIF}
|
|
|
end;
|
|
|
|
|
|
+class function TPath.GetAppPath: string;
|
|
|
+begin
|
|
|
+ Result:=ExtractFilePath(ParamStr(0));
|
|
|
+end;
|
|
|
+
|
|
|
class function TPath.GetCachePath: string;
|
|
|
begin
|
|
|
{$IfDef MSWINDOWS}
|