Added in API level 26

PosixFileAttributes

interface PosixFileAttributes : BasicFileAttributes
java.nio.file.attribute.PosixFileAttributes

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 PosixFileAttributeView by invoking its readAttributes method.

Summary

Public methods
abstract GroupPrincipal!

Returns the group owner of the file.

abstract UserPrincipal!

Returns the owner of the file.

abstract MutableSet<PosixFilePermission!>!

Returns the permissions of the file.

Inherited functions

Public methods

group

Added in API level 26
abstract fun group(): GroupPrincipal!

Returns the group owner of the file.

Return
GroupPrincipal! the file group owner

owner

Added in API level 26
abstract fun owner(): UserPrincipal!

Returns the owner of the file.

Return
UserPrincipal! the file owner

permissions

Added in API level 26
abstract fun permissions(): MutableSet<PosixFilePermission!>!

Returns the permissions of the file. The file permissions are returned as a set of 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 setPermissions method to update the file's permissions.

Return
MutableSet<PosixFilePermission!>! the file permissions