// create a File object for the parent directory
File fileDirectory = new File(Environment.getExternalStorageDirectory()+"/filexxxx");
// have the object build the directory structure, if needed.
fileDirectory.mkdirs();
File file = new File( fileDirectory.getAbsolutePath(),filename );
FileOutputStream fos = new FileOutputStream(file);
本文详细介绍了如何使用Java创建文件夹与文件的基本操作,包括创建目录结构、指定文件路径和使用FileOutputStream进行文件输出。
3754

被折叠的 条评论
为什么被折叠?



