Stay organized with collections
Save and categorize content based on your preferences.
StandardCopyOption
class StandardCopyOption : CopyOption
Defines the standard copy options.
Summary
Enum values |
Move the file as an atomic file system operation.
|
Copy attributes to the new file.
|
Replace an existing file if it exists.
|
Enum values
ATOMIC_MOVE
enum val ATOMIC_MOVE : StandardCopyOption
Move the file as an atomic file system operation.
COPY_ATTRIBUTES
enum val COPY_ATTRIBUTES : StandardCopyOption
Copy attributes to the new file.
REPLACE_EXISTING
enum val REPLACE_EXISTING : StandardCopyOption
Replace an existing file if it exists.
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.
[[["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 2025-02-10 UTC."],[],[],null,["# StandardCopyOption\n\nAdded in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nStandardCopyOption\n==================\n\n```\nclass StandardCopyOption : CopyOption\n```\n\n|---|---|---------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) |||\n| ↳ | [kotlin.Enum](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-enum/index.html)\\\u003c[java.nio.file.StandardCopyOption](#)\\\u003e ||\n| | ↳ | [java.nio.file.StandardCopyOption](#) |\n\n|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Known Direct Subclasses [StandardCopyOption.ATOMIC_MOVE](#ENUM_VALUE:ATOMIC_MOVE), [StandardCopyOption.COPY_ATTRIBUTES](#ENUM_VALUE:COPY_ATTRIBUTES), [StandardCopyOption.REPLACE_EXISTING](#ENUM_VALUE:REPLACE_EXISTING) |---------------------------------------------------------------------|---------------------------------------------------| | [StandardCopyOption.ATOMIC_MOVE](#ENUM_VALUE:ATOMIC_MOVE) | Move the file as an atomic file system operation. | | [StandardCopyOption.COPY_ATTRIBUTES](#ENUM_VALUE:COPY_ATTRIBUTES) | Copy attributes to the new file. | | [StandardCopyOption.REPLACE_EXISTING](#ENUM_VALUE:REPLACE_EXISTING) | Replace an existing file if it exists. | |\n\nDefines the standard copy options.\n\nSummary\n-------\n\n| Enum values ||\n|------------------------------------------------------------------------------------------|---|\n| [ATOMIC_MOVE](#ENUM_VALUE:ATOMIC_MOVE) Move the file as an atomic file system operation. |\n| [COPY_ATTRIBUTES](#ENUM_VALUE:COPY_ATTRIBUTES) Copy attributes to the new file. |\n| [REPLACE_EXISTING](#ENUM_VALUE:REPLACE_EXISTING) Replace an existing file if it exists. |\n\nEnum values\n-----------\n\n### ATOMIC_MOVE\n\nAdded in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nenum val ATOMIC_MOVE : StandardCopyOption\n```\n\nMove the file as an atomic file system operation. \n\n### COPY_ATTRIBUTES\n\nAdded in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nenum val COPY_ATTRIBUTES : StandardCopyOption\n```\n\nCopy attributes to the new file. \n\n### REPLACE_EXISTING\n\nAdded in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nenum val REPLACE_EXISTING : StandardCopyOption\n```\n\nReplace an existing file if it exists."]]