System. Io. File and system. Io. fileinfo

Source: Internet
Author: User

1. bool exist = system. io. directory. exists (CFG. xmlproductpath + @ "\ mobile \"); // determines whether a folder exists
2. directory. createdirectory (CFG. xmlproductpath + @ "\ mobile \"); // create a mobile folder
3. string [] dirs = NULL;
dirs = directory. getfiles (CFG. xmlproductpath + @ "\ mobile \"); // return the file name in the mobile folder
4. fileinfo = new fileinfo (dirs [I]); // obtain file information (including path packaging)
string rawurl = fileinfo. name; // get the file name
5. string Path = application. startuppath + "\ page.html "; // obtain the path of the executable file (excluding the name of the executable file) that has started the Program of the application.
6. bool isfileexist = file. exists (PATH); // determines whether a file exists.
7. file. writealltext (path, txtsnatch. text, encoding. getencoding (mymission. charset); // create a new file, write the specified encoding string to it, and then close the file
8. system. diagnostics. process. start ("iexplore. EXE ", path0; // use IE to open the file in the specified path
system. diagnostics. process. start ("notepad. EXE ", PATH); // use NotePad to open the file in the specified path

online collection Article content: http://www.cnblogs.com/shj0633/archive/2007/01/18/623708.html

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.