【发布时间】:2015-09-30 09:58:53
【问题描述】:
我正在阅读有关 PhoneGap 的文档,并且在获取文件时很难理解独占参数的意义。
因此文档将其列为示例。
// Create the lock file, if and only if it doesn't exist.
lockFile = dataDir.getFile("lockfile.txt", {create: true, exclusive: true});
所以我正在努力理解的是,如果文件不存在,它肯定只会创建“lockfile.txt”吗?
将 Exclusive 参数设置为 true 有何不同?什么时候需要?
【问题讨论】:
标签: android ios cordova phonegap-plugins phonegap-build