Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

# FileAttribute


`
public


interface
FileAttribute
`


`


`

|---|
| java.nio.file.attribute.FileAttribute\<T\> |

<br />

*** ** * ** ***

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 `https://developer.android.com/reference/java/nio/file/Files#createFile(java.nio.file.Path,%20java.nio.file.attribute.FileAttribute<?>[])` or `https://developer.android.com/reference/java/nio/file/Files#createDirectory(java.nio.file.Path,%20java.nio.file.attribute.FileAttribute<?>[])` methods.
**See also:**

- `https://developer.android.com/reference/java/nio/file/attribute/PosixFilePermissions#asFileAttribute(java.util.Set<java.nio.file.attribute.PosixFilePermission>)`

## Summary

| ### Public methods ||
|---|---|
| ` abstract https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/java/nio/file/attribute/FileAttribute#name()() ` Returns the attribute name. |
| ` abstract T` | ` https://developer.android.com/reference/java/nio/file/attribute/FileAttribute#value()() ` Returns the attribute value. |

## Public methods

### name

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public abstract String name ()
```

Returns the attribute name.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | The attribute name <br /> |

### value

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public abstract T value ()
```

Returns the attribute value.

<br />

| Returns ||
|---|---|
| `T` | The attribute value <br /> |