本文整理自网络,侵删。
刚好有个朋友问Android中怎么获取安装路径.
Delphi早就把IO相关的都提取到System.IoUtils单元中了.
路径操作就使用TPath的方法都很方便.
uses
System.IoUtils
TPath.GetTempPath//临时目录
TPath.GetCameraPath//照相机目录(照片/录像)
TPath.GetMusicPath//音乐目录
TPath.GetDownloadsPath//下载目录
……
如果使用TPath类的静态方法那么代码就是跨平台的,在Windows,Mac,iOS,Android上都能用.
如果仅仅对Android的操作也可以使用Androidapi.IOUtils单元的那些GetXX的函数,也很简单,都没有参数,并且返回值都是字符串.
相关阅读 >>
Delphi ��b以 listbox 的item �� hint
Delphi application.title在win7下失效了?
Delphi dateof、timeof、yearof、monthof、weekof、dayof、hourof、minuteof、secondof、millisecondof �c 提取时间成分
Delphi richedit memo1支持中文搜索、向上查找、区分大小写
更多相关阅读请进入《Delphi》频道 >>