/** * @Title: FileTestActivity.java * @Package com.mzh.www * @Description: 文件类File的常用方法 * @author MZH * @version V2.2 */ public class FileTestActivity extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main);
/** * createNewFile() Creates a new, empty file on the file system according to the path information stored in this file. 这个方法指在指定路径下创建一个empty(空的,小马就认识几个单词, *其余的都有道查)文件 */
/** * mkdir() Creates the directory named by the trailing filename of this file. 这个方法指:创建一个指定目录下的文件,但这个方法不能创建多个目录, 一般都使用加S的,这个尽量少用,一般私有文件 及私有目录的创建用这个方法 */
/** * mkdirs() Creates the directory named by the trailing filename of this file, including the complete directory path required to create this directory. 这个方法指:创建一个指定目录下的文件,与上面不同的是, 此方法可以创建多个目录哦,常用的创建文件的方法 */