CopyOption
Stay organized with collections
Save and categorize content based on your preferences.
Known Indirect Subclasses
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-07-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-07-10 UTC."],[[["\u003cp\u003e\u003ccode\u003eCopyOption\u003c/code\u003e is an interface used to configure file copy and move operations in Java NIO.2.\u003c/p\u003e\n"],["\u003cp\u003eIt provides options for handling symbolic links and other standard copy behaviors through its implementations like \u003ccode\u003eLinkOption\u003c/code\u003e and \u003ccode\u003eStandardCopyOption\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThis interface is utilized with methods such as \u003ccode\u003eFiles.copy()\u003c/code\u003e and \u003ccode\u003eFiles.move()\u003c/code\u003e to customize file operations.\u003c/p\u003e\n"]]],[],null,["public interface **CopyOption** \n\n|---|---|---|\n| Known Indirect Subclasses [LinkOption](../../../../reference/java/nio/file/LinkOption.html), [StandardCopyOption](../../../../reference/java/nio/file/StandardCopyOption.html) |-----------------------------------------------------------------------------------|-----------------------------------------------------------| | [LinkOption](../../../../reference/java/nio/file/LinkOption.html) | Defines the options as to how symbolic links are handled. | | [StandardCopyOption](../../../../reference/java/nio/file/StandardCopyOption.html) | Defines the standard copy options. | |||\n\nAn object that configures how to copy or move a file.\n\nObjects of this type may be used with the [Files.copy(Path,Path,CopyOption...)](../../../../reference/java/nio/file/Files.html#copy(java.nio.file.Path,%20java.nio.file.Path,%20java.nio.file.CopyOption...)),\n[Files.copy(InputStream,Path,CopyOption...)](../../../../reference/java/nio/file/Files.html#copy(java.io.InputStream,%20java.nio.file.Path,%20java.nio.file.CopyOption...)) and [Files.move(Path,Path,CopyOption...)](../../../../reference/java/nio/file/Files.html#move(java.nio.file.Path,%20java.nio.file.Path,%20java.nio.file.CopyOption...)) methods to configure how a file is\ncopied or moved.\n\nThe [StandardCopyOption](../../../../reference/java/nio/file/StandardCopyOption.html) enumeration type defines the\n*standard* options."]]