Java Learning -010-Creating folder source code

Source: Internet
Author: User

This article source code is mainly for the application of Java to create file directory source code. If there is any deficiency, please ask the great God to correct me, I appreciate it!

Create the folder source code as follows:

1     /**2 * @function file operation: Create folder. If the folder does not exist, the folder is created and is not created if it exists. 3      * 4      * @authorAARON.FFP5      * @versionv1.0.0:autouiselenium main.java.aaron.java.tools Fileutils.java createpath, 2015-2-2 21:03:31 Exp $6      * 7      * @paramPath : Folder path8      * 9      * @returnBoolean returns True if the folder was successfully created;Ten      */ One      Public BooleanCreatepath (String path) { A         BooleanFlag =false; -          -         Try{ theFile f =NewFile (path); -              -             if(!f.exists ()) { - f.mkdirs (); +             } -              +Flag =true; A}Catch(Exception IoE) { at              This. Message =ioe.getmessage (); -              This. Logger.error ( This. message); -         } -          -         returnFlag; -}
Create a file directory (cascade to create a folder)

At this point, Java Learning -010-Create folder source code successfully completed, I hope this article can give beginners Java you a reference.

Finally, very grateful to the pro-stop, I hope this article can be pro helpful. Warmly welcome the kiss to discuss together and progress together. Thank you so much! ^_^

Java Learning -010-Creating folder source code

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.