Skip to content
vimfung edited this page Dec 17, 2018 · 6 revisions

Summary

该类型提供了一系列用于获取各种路径以及路径判断的功能

继承

Path > Object

支持平台

iOS Android Unity3D

Class Methods

app

获取应用的安装目录

声明

function Path:app();

返回值

应用的安装目录


home

获取应用沙箱的根目录

声明

function Path:home()

返回值

应用沙箱的根目录


docs

获取应用沙箱的文档目录

声明

function Path:docs()

返回值

应用沙箱的文档目录


caches

获取应用沙箱的缓存目录

声明

function Path:caches()

返回值

应用沙箱的缓存目录


tmp

获取应用沙箱的临时目录

声明

function Path:tmp()

返回值

应用沙箱的临时目录


exists

判断指定路径是否存在

声明

function Path:exists(path)

参数
  • path 要判断的路径,为绝对路径,不能为nil
返回值

如果路径存在返回True,否则返回False

Clone this wiki locally