Java Reference
In-Depth Information
Make sure the file doesn't exist
Co
py the entire file contents
Ve
rify the file size
Ge
t the full path
Ite
rate over the path elements (directories and file)
Cl
ean up
Legacy conversion
You can get a
Path
from a legacy
File
with the
File
's
toPath()
method. You can go in
the other direction using the
Path
's
toFile()
method.