Delphi FMX Mobile Directory extraction, the IO related to the extraction into the system.ioutils unit

Source: Internet
Author: User

Delphi extracts all IO-related elements into the system.ioutils unit.
It is convenient to use the Tpath method for path operation.
Uses System.ioutils

tpath.gettemppath//Temp Directory
tpath.getcamerapath//Camera Catalogue (Photo/video)
tpath.getmusicpath//Music Catalogue
tpath.getdownloadspath//Download Catalogue
......
If you use static methods of the Tpath class then the code is cross-platform and can be used on windows,mac,ios,android. If only the operation of Android can also use the Androidapi.ioutils unit of those getxx functions, it is very simple, there are no parameters, and the return value is a string.

You can test with any one of these events:
ShowMessage (' GetCachePath: ' + tpath.getpathroot (Tpath.getcachepath));
ShowMessage (' GetTempPath: ' + tpath.gettemppath);
ShowMessage (' Gethomepath: ' + tpath.gethomepath);
ShowMessage (' Getdocumentspath: ' + tpath.getdocumentspath); ShowMessage (' Getshareddocumentspath: ' + tpath.getshareddocumentspath);
ShowMessage (' Getsharedpicturespath: ' + tpath.getsharedpicturespath);
ShowMessage (' Getshareddownloadspath: ' + tpath.getshareddownloadspath);
ShowMessage (' GetCachePath: ' + tpath.getcachepath);
ShowMessage (' Getcamerapath: ' + tpath.getcamerapath);
ShowMessage (' Getpicturespath: ' + tpath.getpicturespath);
ShowMessage (' Getpublicpath: ' + tpath.getpublicpath);
Here are the results of the Nubia Z5 Phone test (all functions under Tpath, none at all):
GetRandomFileName:L8d4hdw0.W2d
gettempfilename:/storage/sdcard0/android/data/com.embarcadero.project1/files/tmp/tmp.qqvwf21410
Gettemppath:/storage/sdcard0/android/data/com.embarcadero.project1/files/tmp
Gethomepath:/data/data/com.embarcadero.project1/files
Getdocumentspath:/data/data/com.embarcadero.project1/files
Getshareddocumentspath:/storage/sdcard0/android/data/com.embarcadero.project1/files
Getlibrarypath:/data/app-lib/com.embarcadero.project1-2
Getcachepath:/data/data/com.embarcadero.project1/cache
Getpublicpath:/storage/sdcard0/android/data/com.embarcadero.project1/files
Getpicturespath:/storage/sdcard0/android/data/com.embarcadero.project1/files/pictures
Getsharedpicturespath:/storage/sdcard0/pictures
Getcamerapath:/storage/sdcard0/android/data/com.embarcadero.project1/files/dcim
Getsharedcamerapath:/storage/sdcard0/dcim
Getmusicpath:/storage/sdcard0/android/data/com.embarcadero.project1/files/music
Getsharedmusicpath:/storage/sdcard0/music
Getmoviespath:/storage/sdcard0/android/data/com.embarcadero.project1/files/movies
Getalarmspath:/storage/sdcard0/android/data/com.embarcadero.project1/files/alarms
Getsharedalarmspath:/storage/sdcard0/alarms
Getdownloadspath:/storage/sdcard0/android/data/com.embarcadero.project1/files/download
Getshareddownloadspath:/storage/sdcard0/download
Getringtonespath:/storage/sdcard0/android/data/com.embarcadero.project1/files/ringtones
Getsharedringtonespath:/storage/sdcard0/ringtones

Delphi FMX Mobile Directory extraction, the IO related to the extraction into the system.ioutils unit

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.