05 2013 档案
IOS开发中判断文件是否存在,不存在则拷贝
摘要:首先,先总结一下如何获取Documents目录,在ios开发中,我们经常需要检索Documents目录的完整路径以便读取和写入文件,我总结了以下两种方法:1、NSString*documentsDirectory =[NSHomeDirectory() stringByAppendingPathComponent:@"Documents"];2、NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *document 阅读全文
posted @ 2013-05-02 09:28 aparche 阅读(1200) 评论(0) 推荐(0) 编辑
Java中枚举的使用
摘要:enum Colors {Red(1), Yellow(2), Blue(3);private int _value; private Colors(int value) { _value = value; } public int value() { return _value; }}public class TestEnum {public static void main(String[] args) {int result = Colors.Blue.value();//获取枚举元素对应的值,即()里面的值System.out.println(result);Colors colo.. 阅读全文
posted @ 2013-05-02 09:09 aparche 阅读(225) 评论(0) 推荐(0) 编辑


点击右上角即可分享
微信分享提示