Android--写文件
摘要:sdcard读写权限是必需的 try { // 获取扩展存储设备的文件目录 File SDFile = android.os.Environment.getExternalStorageDirectory(); // 打开文件 File myFile = new File(SDFile.getAbsolutePath() + File.separator + "MyFile.txt"); // 判断是否存在,不存在则创建 if (!myFile.exists()) { myFile.createNewFile(); } // 写数据 String szOutTe...
阅读全文
posted @
2011-09-14 22:15
lock
阅读(335)
推荐(0)