Java NIO file path issue

前端 未结 8 2051
臣服心动
臣服心动 2020-12-01 11:36

I used the following code to get the path

Path errorFilePath = FileSystems.getDefault().getPath(errorFile);

When I try to move

8条回答
  •  鱼传尺愫
    2020-12-01 12:25

    The path \C:\Sample\sample.txt must not have a leading \. It should be just C:\Sample\sample.txt

提交回复
热议问题