0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

入出力ストリーム

Last updated at Posted at 2022-01-30

コピー処理

Filesクラスを用いてのコピー処理は以下。

Files.copy(Path source,Path target,CopyOption...options);

1.Path source
コピー元
2.Path target
コピー先
3.CopyOption...options
コピーの実行方法

Pathsクラスのgetメソッド(*1)を使用し、
コピー元とコピー先情報についてPathインターフェースをデータ型としてインスタンス化する。
作成したインスタンスをそれぞれ上記1と2に代入して、3でコピー方法を指定する。

Files.copy(docs.oracle引用)

  • *1 FileSystems.getDefault().getPathの省略形。非推奨?
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?