Stay organized with collections
Save and categorize content based on your preferences.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[null,null,["Last updated 2025-02-10 UTC."],[],[],null,["# CopyOption\n\nAdded in [API level 26](/guide/topics/manifest/uses-sdk-element#ApiLevels) \nSummary: \n\nCopyOption\n==========\n\n\n`\npublic\n\n\ninterface\nCopyOption\n`\n\n\n`\n\n\n`\n\n|--------------------------|\n| java.nio.file.CopyOption |\n\n|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Known indirect subclasses [LinkOption](/reference/java/nio/file/LinkOption), [StandardCopyOption](/reference/java/nio/file/StandardCopyOption) |-------------------------------------------------------------------|-----------------------------------------------------------| | [LinkOption](/reference/java/nio/file/LinkOption) | Defines the options as to how symbolic links are handled. | | [StandardCopyOption](/reference/java/nio/file/StandardCopyOption) | Defines the standard copy options. | |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\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#copy(java.nio.file.Path,%20java.nio.file.Path,%20java.nio.file.CopyOption[])),\n[Files.copy(InputStream,Path,CopyOption...)](/reference/java/nio/file/Files#copy(java.io.InputStream,%20java.nio.file.Path,%20java.nio.file.CopyOption[])) and [Files.move(Path,Path,CopyOption...)](/reference/java/nio/file/Files#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) enumeration type defines the\n*standard* options."]]