FileAttribute
Stay organized with collections
Save and categorize content based on your preferences.
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.
Public Method Summary
abstract
String
|
name()
Returns the attribute name.
|
abstract
T
|
value()
Returns the attribute value.
|
Public Methods
public
abstract
String
name
()
Returns the attribute name.
public
abstract
T
value
()
Returns the attribute value.
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."],[[["`FileAttribute` objects store file attributes that can be set when creating files or directories using `createFile` or `createDirectory` methods."],["This interface provides two methods: `name()` to retrieve the attribute name and `value()` to retrieve the attribute value."],["`PosixFilePermissions.asFileAttribute` is a relevant method for creating `FileAttribute` instances."]]],["`FileAttribute` represents a file attribute's value that can be set atomically during file or directory creation using `Files.createFile` or `Files.createDirectory`. It contains two core actions: `name()`, which returns the attribute's name as a String, and `value()`, which returns the attribute's value, with the type determined dynamically. `PosixFilePermissions.asFileAttribute` is relevant.\n"]]