Einzelnen Beitrag anzeigen

Benutzerbild von himitsu
himitsu

Registriert seit: 11. Okt 2003
Ort: Elbflorenz
44.184 Beiträge
 
Delphi 12 Athens
 
#18

AW: TPath.GetIrgendwas

  Alt 23. Okt 2016, 02:39
Ich hatte mich mal bissl umgeguckt und vorallem das aus OH/Doku von Delphi/Android/Apple und meinen alten RTL-Quellcodes zusammengefasst.
Im Prinzip sind das die Pfade, auf die man in den verschiedenen OS Zugriff drauf hat, so weit ich das richtig erkannt hab.
iOS Data Storage Guidelines
File System Programming Guide
File System Programming Guide (OSX)
  • Warum zeigen in iOS/OSX die TPath.GetSchared nicht auf Unterverzeichnisse von "Public"?
  • GetDownloadPath für Windows stimmt auch mit keinem Standardpfad irgendeines Browsers überein.
  • GetSharedDocumentsPath beim Android ist nicht Shared, aber dafür ist GetDocumentsPath Shared.
  • Und obwohl in der OH bei jeder GetPath-Methode als Erstes steht, dass diese Methoden ein '' zurückgeben, wenn der Path nicht vorhanden ist, tuten sie das nicht. (Ja, weiter unten steht manchmal nochma das Gegenteil, aber egal)

Also jeweils OS, die Hauptunktion, welche drauf zeigt, und dann noch der Pfad, alles sortiert nach Pfaden.
Code:
Android        GetLibraryPath             /data/app-lib/:AppID:
Android        GetCachePath               /data/data/:AppID:/cache
Android        GetDocumentsPath&HomePath  /data/data/:AppID:/files
Android        GetPublicPath              /storage/emulated/0/Android/data/:AppID:/files
Android        GetAlarmsPath              /storage/emulated/0/Android/data/:AppID:/files/Alarms
Android        GetCameraPath              /storage/emulated/0/Android/data/:AppID:/files/DCIM
Android        GetDownloadsPath           /storage/emulated/0/Android/data/:AppID:/files/Download
Android        GetMoviesPath              /storage/emulated/0/Android/data/:AppID:/files/Movies
Android        GetMusicPath               /storage/emulated/0/Android/data/:AppID:/files/Music
Android        GetPicturesPath            /storage/emulated/0/Android/data/:AppID:/files/Pictures
Android        GetRingtonesPath           /storage/emulated/0/Android/data/:AppID:/files/Ringtones
Android                                    /storage/emulated/0/Android/data/:AppID:/files/cache
Android                                    /storage/emulated/0/Android/data/:AppID:/files/files
Android        GetTempPath                /storage/emulated/0/Android/data/:AppID:/files/tmp
Android        GetSharedAlarmsPath        /storage/emulated/0/Alarms
Android                                    /storage/emulated/0/DCIM
Android        GetSharedDownloadsPath     /storage/emulated/0/Download
Android        GetSharedMoviesPath        /storage/emulated/0/Movies
Android        GetSharedMusicPath         /storage/emulated/0/Music
Android        GetSharedPicturesPath      /storage/emulated/0/Pictures
Android        GetSharedRingtonesPath     /storage/emulated/0/Ringtones


iOS-Gerät      GetHomePath                /private/var/mobile/Applications/:AppID:
iOS-Gerät      GetTempPath                /private/var/mobile/Applications/:AppID:/tmp
iOS-Simulator  GetHomePath                /var/mobile/Applications/:AppID:
iOS            GetDocumentsPath           /var/mobile/Applications/:AppID:/Documents
iOS-Simulator  GetDownloadsPath           /var/mobile/Applications/:AppID:/Downloads
iOS            GetLibraryPath             /var/mobile/Applications/:AppID:/Library
iOS            GetCachePath               /var/mobile/Applications/:AppID:/Library/Caches
iOS-Simulator  GetMoviesPath              /var/mobile/Applications/:AppID:/Movies
iOS-Simulator  GetMusicPath               /var/mobile/Applications/:AppID:/Music
iOS-Simulator  GetPicturesPath            /var/mobile/Applications/:AppID:/Pictures
iOS-Simulator  GetPublicPath              /var/mobile/Applications/:AppID:/Public
iOS-Simulator  GetTempPath                /var/mobile/Applications/:AppID:/tmp

iOS            shared files               only via Public-directories, iCloud or similar (application are sandboxed)
iOS-Simulator  -                           /var/mobile/Applications -> /Users/:UserName:/Library/Application Support/iPhone Simulator/<SDK-Version>/Applications


Mac OS X       ud GetHomePath             /Users/:UserName:
Mac OS X       user domain                /Users/:UserName:/Desktop
Mac OS X       ud GetDocumentsPath        /Users/:UserName:/Documents
Mac OS X       ud GetDownloadsPath        /Users/:UserName:/Downloads
Mac OS X       ud GetLibraryPath          /Users/:UserName:/Library
Mac OS X       ud GetCachePath            /Users/:UserName:/Library/Caches
Mac OS X       ud GetMoviesPath           /Users/:UserName:/Movies
Mac OS X       ud GetMusicPath            /Users/:UserName:/Music
Mac OS X       ud GetPicturesPath         /Users/:UserName:/Pictures
Mac OS X       ud GetPublicPath           /Users/:UserName:/Public
Mac OS X       user domain                /Users/Shared
Mac OS X       -  GetTempPath             /var/folders/:RandomDir:
Mac OS X       local domain               /Applications
Mac OS X       local domain               /Applications/Utilities
Mac OS X       local domain               /Developer
Mac OS X       local domain               /Library
Mac OS X       system domain              /System
Mac OS X       system domain              /System/Library

iOS /Mac OS    the Public directory is accessible by other users/applications on the system


Windows        GetCache&DownloadsPath     C:\Users\:UserName:\AppData\Local
Windows        GetTempPath                C:\Users\:UserName:\AppData\Local\Temp
Windows        GetHomePath                C:\Users\:UserName:\AppData\Roaming
Windows        GetPicturesPath            C:\Users\:UserName:\Pictures
Windows        GetDocumentsPath           C:\Users\:UserName:\Documents
Windows        GetMoviesPath              C:\Users\:UserName:\Videos
Windows        GetMusicPath               C:\Users\:UserName:\Music
Windows        GetSharedPicturesPath      C:\Users\Public\Pictures
Windows        GetSharedDocumentsPath     C:\Users\Public\Documents
Windows        GetSharedMusicPath         C:\Users\Public\Music
Windows        GetSharedMoviesPath        C:\Users\Public\Videos
Windows        GetPublicPath              C:\ProgramData
Windows        GetLibraryPath             C:\Program Files\:InstallPath:
Und 'ne kleine Testfunktion, welche Nachfolgendes anzeigt.
Delphi-Quellcode:
uses
  System.IOUtils;

procedure TForm6.FormShow(Sender: TObject);
begin
  Memo1.Lines.Clear;
  Memo1.Lines.Add('GetLibraryPath ' + TPath.GetLibraryPath);
  Memo1.Lines.Add('');
  Memo1.Lines.Add('GetHomePath ' + TPath.GetHomePath);
  Memo1.Lines.Add('GetCachePath ' + TPath.GetCachePath);
  Memo1.Lines.Add('GetTempPath ' + TPath.GetTempPath);
  Memo1.Lines.Add('GetPublicPath ' + TPath.GetPublicPath);
  Memo1.Lines.Add('');
  Memo1.Lines.Add('GetDocumentsPath ' + TPath.GetDocumentsPath);
  Memo1.Lines.Add('GetPicturesPath ' + TPath.GetPicturesPath);
  Memo1.Lines.Add('GetCameraPath ' + TPath.GetCameraPath);
  Memo1.Lines.Add('GetMusicPath ' + TPath.GetMusicPath);
  Memo1.Lines.Add('GetAlarmsPath ' + TPath.GetAlarmsPath);
  Memo1.Lines.Add('GetRingtonesPath ' + TPath.GetRingtonesPath);
  Memo1.Lines.Add('GetMoviesPath ' + TPath.GetMoviesPath);
  Memo1.Lines.Add('GetDownloadsPath ' + TPath.GetDownloadsPath);
  Memo1.Lines.Add('');
  Memo1.Lines.Add('GetSharedDocumentsPath ' + TPath.GetSharedDocumentsPath);
  Memo1.Lines.Add('GetSharedPicturesPath ' + TPath.GetSharedPicturesPath);
  Memo1.Lines.Add('GetSharedCameraPath ' + TPath.GetSharedCameraPath);
  Memo1.Lines.Add('GetSharedMusicPath ' + TPath.GetSharedMusicPath);
  Memo1.Lines.Add('GetSharedAlarmsPath ' + TPath.GetSharedAlarmsPath);
  Memo1.Lines.Add('GetSharedRingtonesPath ' + TPath.GetSharedRingtonesPath);
  Memo1.Lines.Add('GetSharedMoviesPath ' + TPath.GetSharedMoviesPath);
  Memo1.Lines.Add('GetSharedDownloadsPath ' + TPath.GetSharedDownloadsPath);
end;
Windows 7:
Code:
GetLibraryPath        C:\Users\Frank\Documents\Embarcadero\Studio\Projekte\Win32\Debug\

GetHomePath           C:\Users\Frank\AppData\Roaming
GetCachePath          C:\Users\Frank\AppData\Local
GetTempPath           C:\Users\Frank\AppData\Local\Temp\
GetPublicPath         C:\ProgramData

GetDocumentsPath      C:\Users\Frank\Documents
GetPicturesPath       C:\Users\Frank\Pictures
GetCameraPath         C:\Users\Frank\Pictures
GetMusicPath          C:\Users\Frank\Music
GetAlarmsPath         C:\Users\Frank\Music
GetRingtonesPath      C:\Users\Frank\Music
GetMoviesPath         C:\Users\Frank\Videos
GetDownloadsPath      C:\Users\Frank\AppData\Local

GetSharedDocumentsPath C:\Users\Public\Documents
GetSharedPicturesPath C:\Users\Public\Pictures
GetSharedCameraPath   C:\Users\Public\Pictures
GetSharedMusicPath    C:\Users\Public\Music
GetSharedAlarmsPath   C:\Users\Public\Music
GetSharedRingtonesPath C:\Users\Public\Music
GetSharedMoviesPath   C:\Users\Public\Videos
GetSharedDownloadsPath C:\ProgramData
Android 4:
Code:
GetLibraryPath        /data/app-lib/com.embarcadero.Project6-1

GetHomePath           /data/data/com.embarcadero.Project6/files
GetCachePath          /data/data/com.embarcadero.Project6/cache
GetTempPath           /storage/emulated/0/Android/data/com.embarcadero.Project6/files/tmp
GetPublicPath         /storage/emulated/0/Android/data/com.embarcadero.Project6/files

GetDocumentsPath      /data/data/com.embarcadero.Project6/files
GetPicturesPath       /storage/emulated/0/Android/data/com.embarcadero.Project6/files/Pictures
GetCameraPath         /storage/emulated/0/Android/data/com.embarcadero.Project6/files/DCIM
GetMusicPath          /storage/emulated/0/Android/data/com.embarcadero.Project6/files/Music
GetAlarmsPath         /storage/emulated/0/Android/data/com.embarcadero.Project6/files/Alarms
GetRingtonesPath      /storage/emulated/0/Android/data/com.embarcadero.Project6/files/Ringtones
GetMoviesPath         /storage/emulated/0/Android/data/com.embarcadero.Project6/files/Movies
GetDownloadsPath      /storage/emulated/0/Android/data/com.embarcadero.Project6/files/Download

GetSharedDocumentsPath /storage/emulated/0/Android/data/com.embarcadero.Project6/files
GetSharedPicturesPath /storage/emulated/0/Pictures
GetSharedCameraPath   /storage/emulated/0/DCIM
GetSharedMusicPath    /storage/emulated/0/Music
GetSharedAlarmsPath   /storage/emulated/0/Alarms
GetSharedRingtonesPath /storage/emulated/0/Ringtones
GetSharedMoviesPath   /storage/emulated/0/Movies
GetSharedDownloadsPath /storage/emulated/0/Download
Android 5 konnte ich nicht gucken, da meine Delphi-Programme da nicht mehr laufen.
Application does not support this System
und OSX/iOS hab'sch net.
$2B or not $2B
  Mit Zitat antworten Zitat