Adobe AIR的如何检查文件夹是否存在? [英] Adobe Air how to check if folder exists?
本文介绍了Adobe AIR的如何检查文件夹是否存在?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Adobe AIR的(2.0)如何检查文件夹是否存在? (如文件夹C:\ Program Files文件(x86)的在Windows上)(需要code为例,请)
Adobe Air (2.0) how to check if folder exists? (like folder C:\Program Files (x86) on windows) (code example needed, please)
推荐答案
我想你可以使用File类的功能如下:
I think you can use the following functions of the File class:
var folder:File = File.userDirectory.resolvePath(folderPath);
folder.isDirectory;
在 isDirectory
属性将返回一个布尔值取决于该文件夹是否存在。希望帮助,
The isDirectory
property will return a Boolean depending on whether or not that folder exists. Hope that helps,
得不
这篇关于Adobe AIR的如何检查文件夹是否存在?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文