IO_Byte stream_Node stream_Folder copy_Tool production_The relationship between file suffix and software JAVA149, 163

Source: http://www.bjsxt.com/ 1. S02E149_01IO_byte stream, node stream, folder copy, tool production, file suffix and Software relationship 1. Folder copy a. Recursively search for descendant files or foldersb. Files are copied directly (IO stream copy); The folder is createdc. For example, A is copied to AA A / \ a.txt b | b.txtCopy AA | A / \ a.txt b | b.txt(JAVA163)d. Solution:Cannot copy parent directory to subdirectory (Solution: in the program if(des.getAbsolutePath().contains(src.getAbsolutePath())))Delete the super long directory (source directory: G:/java/test/a, target directory: G:/ java/test/a/b, such a recursive copy, the directory is too long and cannot be deleted)(Solution: Download robocopy, unzip it and configure the directory where robocopy.exe is located into the environment variable. Where does the overlong folder exist? Create an empty directory t in the directory where it is located, and then format it as Robocopy /MIR storepath longlongpath, for example robocopy /MIR G:\java\test\t G:\java\test\a,The longlongpath above refers to the folder of the super long folder. Running from the command line, after a while of scrolling, longlongpath is copied to t, which means it becomes an empty directory) package com.test.io.stream;import java.io .File;import java.io.FileInputStream;import java.io.FileNotFoundException ;import java.io.FileOutputStream;import java.io.IOException;import java.io.InputStream;import java.io.OutputStream; /** * 3. File copy, program is the bridge a. Establish…

Contact Us

Contact us

181-3619-1160

Online consultation: QQ交谈

E-mail: [email protected]

Working hours: Monday to Friday, 9:00-17:30, holidays off

Follow wechat
Scan wechat and follow us

Scan wechat and follow us

Follow Weibo
Back to top
首页
微信
电话
搜索