刚使用JAVA或者写Android都会傻傻分不清mkdir()和mkdirs()有什么分别。
其实很简单mkdir()只能在下一级目录里创建文件夹,不能带多级路径。
原文:Creates the directory named by the trailing filename of this file. Does not create the complete path required to create this directory.
而mkdirs()则不需要在上级文件夹,直接通过路径来进行创建。
原文:Creates the directory named by the trailing filename of this file, including the complete directory path required to create this directory.