Stay organized with collections
Save and categorize content based on your preferences.
FileAttribute
interface FileAttribute<T : Any!>
An object that encapsulates the value of a file attribute that can be set atomically when creating a new file or directory by invoking the createFile
or createDirectory
methods.
Summary
Public methods |
abstract String! |
Returns the attribute name.
|
abstract T |
Returns the attribute value.
|
Public methods
name
abstract fun name(): String!
Returns the attribute name.
Return |
String! |
The attribute name |
value
abstract fun value(): T
Returns the attribute value.
Return |
T |
The attribute value |
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,["# FileAttribute\n\nAdded in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nFileAttribute\n=============\n\n```\ninterface FileAttribute\u003cT : Any!\u003e\n```\n\n|--------------------------------------------|\n| [java.nio.file.attribute.FileAttribute](#) |\n\nAn object that encapsulates the value of a file attribute that can be set atomically when creating a new file or directory by invoking the [createFile](../Files.html#createFile(java.nio.file.Path,%20java.nio.file.attribute.FileAttribute)) or [createDirectory](../Files.html#createDirectory(java.nio.file.Path,%20java.nio.file.attribute.FileAttribute)) methods.\n\nSummary\n-------\n\n| Public methods ||\n|--------------------------------------------------------------------------------------------|----------------------------------------------------|\n| abstract [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)! | [name](#name())`()` Returns the attribute name. |\n| abstract T | [value](#value())`()` Returns the attribute value. |\n\nPublic methods\n--------------\n\n### name\n\nAdded in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nabstract fun name(): String!\n```\n\nReturns the attribute name.\n\n| Return ||\n|-----------------------------------------------------------------------------------|--------------------|\n| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)! | The attribute name |\n\n### value\n\nAdded in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nabstract fun value(): T\n```\n\nReturns the attribute value.\n\n| Return ||\n|---|---------------------|\n| T | The attribute value |"]]