Android 创建文件

来源:互联网 发布:模拟钢琴软件中文版 编辑:程序博客网 时间:2024/06/18 08:37
public File getAlbumStorageDir(String albumName)  {     String path = "/sdcard"+"/"+"Test_01";  //"/sdcard"  表示在当前内存目录    File file = new File(path,albumName);    if(!file.exists()) {        try        {file.createNewFile();}catch (Exception e)        { e.printStackTrace();}             Log.d("123","ok"+path);    }    return file;}
原创粉丝点击