Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Methods](https://developer.android.com/reference/java/nio/file/attribute/PosixFileAttributes#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/java/nio/file/attribute/PosixFileAttributes#inhmethods)

# PosixFileAttributes


`
public


interface
PosixFileAttributes
`


`


implements

https://developer.android.com/reference/java/nio/file/attribute/BasicFileAttributes


`

|---|
| java.nio.file.attribute.PosixFileAttributes |

<br />

*** ** * ** ***

File attributes associated with files on file systems used by operating systems
that implement the Portable Operating System Interface (POSIX) family of
standards.

The POSIX attributes of a file are retrieved using a `https://developer.android.com/reference/java/nio/file/attribute/PosixFileAttributeView` by invoking its `https://developer.android.com/reference/java/nio/file/attribute/PosixFileAttributeView#readAttributes()` method.

## Summary

| ### Public methods ||
|---|---|
| ` abstract https://developer.android.com/reference/java/nio/file/attribute/GroupPrincipal` | ` https://developer.android.com/reference/java/nio/file/attribute/PosixFileAttributes#group()() ` Returns the group owner of the file. |
| ` abstract https://developer.android.com/reference/java/nio/file/attribute/UserPrincipal` | ` https://developer.android.com/reference/java/nio/file/attribute/PosixFileAttributes#owner()() ` Returns the owner of the file. |
| ` abstract https://developer.android.com/reference/java/util/Set<https://developer.android.com/reference/java/nio/file/attribute/PosixFilePermission>` | ` https://developer.android.com/reference/java/nio/file/attribute/PosixFileAttributes#permissions()() ` Returns the permissions of the file. |

| ### Inherited methods |
|---|---|
| From interface ` https://developer.android.com/reference/java/nio/file/attribute/BasicFileAttributes ` |---|---| | ` abstract https://developer.android.com/reference/java/nio/file/attribute/FileTime` | ` https://developer.android.com/reference/java/nio/file/attribute/BasicFileAttributes#creationTime()() ` Returns the creation time. | | ` abstract https://developer.android.com/reference/java/lang/Object` | ` https://developer.android.com/reference/java/nio/file/attribute/BasicFileAttributes#fileKey()() ` Returns an object that uniquely identifies the given file, or `null` if a file key is not available. | | ` abstract boolean` | ` https://developer.android.com/reference/java/nio/file/attribute/BasicFileAttributes#isDirectory()() ` Tells whether the file is a directory. | | ` abstract boolean` | ` https://developer.android.com/reference/java/nio/file/attribute/BasicFileAttributes#isOther()() ` Tells whether the file is something other than a regular file, directory, or symbolic link. | | ` abstract boolean` | ` https://developer.android.com/reference/java/nio/file/attribute/BasicFileAttributes#isRegularFile()() ` Tells whether the file is a regular file with opaque content. | | ` abstract boolean` | ` https://developer.android.com/reference/java/nio/file/attribute/BasicFileAttributes#isSymbolicLink()() ` Tells whether the file is a symbolic link. | | ` abstract https://developer.android.com/reference/java/nio/file/attribute/FileTime` | ` https://developer.android.com/reference/java/nio/file/attribute/BasicFileAttributes#lastAccessTime()() ` Returns the time of last access. | | ` abstract https://developer.android.com/reference/java/nio/file/attribute/FileTime` | ` https://developer.android.com/reference/java/nio/file/attribute/BasicFileAttributes#lastModifiedTime()() ` Returns the time of last modification. | | ` abstract long` | ` https://developer.android.com/reference/java/nio/file/attribute/BasicFileAttributes#size()() ` Returns the size of the file (in bytes). | ||

## Public methods

### group

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

```
public abstract GroupPrincipal group ()
```

Returns the group owner of the file.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/nio/file/attribute/GroupPrincipal` | the file group owner <br /> |

**See also:**

- `https://developer.android.com/reference/java/nio/file/attribute/PosixFileAttributeView#setGroup(java.nio.file.attribute.GroupPrincipal)`

### owner

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

```
public abstract UserPrincipal owner ()
```

Returns the owner of the file.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/nio/file/attribute/UserPrincipal` | the file owner <br /> |

**See also:**

- `https://developer.android.com/reference/java/nio/file/attribute/FileOwnerAttributeView#setOwner(java.nio.file.attribute.UserPrincipal)`

### permissions

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

```
public abstract Set<PosixFilePermission> permissions ()
```

Returns the permissions of the file. The file permissions are returned
as a set of `https://developer.android.com/reference/java/nio/file/attribute/PosixFilePermission` elements. The returned set is a
copy of the file permissions and is modifiable. This allows the result
to be modified and passed to the `https://developer.android.com/reference/java/nio/file/attribute/PosixFileAttributeView#setPermissions(java.util.Set<java.nio.file.attribute.PosixFilePermission>)` method to update the file's permissions.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/util/Set<https://developer.android.com/reference/java/nio/file/attribute/PosixFilePermission>` | the file permissions <br /> |

**See also:**

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