PosixFileAttributes
Stay organized with collections
Save and categorize content based on your preferences.
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.
Inherited Method Summary
From interface
java.nio.file.attribute.BasicFileAttributes
abstract
FileTime
|
|
abstract
Object
|
fileKey()
Returns an object that uniquely identifies the given file, or null if a file key is not available.
|
abstract
boolean
|
|
abstract
boolean
|
isOther()
Tells whether the file is something other than a regular file, directory,
or symbolic link.
|
abstract
boolean
|
isRegularFile()
Tells whether the file is a regular file with opaque content.
|
abstract
boolean
|
|
abstract
FileTime
|
|
abstract
FileTime
|
|
abstract
long
|
size()
Returns the size of the file (in bytes).
|
Public Methods
Returns the group owner of the file.
Returns the owner of the file.
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.
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."],[[["`PosixFileAttributes` provides access to file attributes specific to POSIX-compliant file systems, including owner, group, and permissions."],["It extends `BasicFileAttributes`, inheriting standard file attributes like size, creation time, and modification time."],["File attributes are retrieved using a `PosixFileAttributeView` object by invoking its `readAttributes()` method."],["The `permissions` method returns a modifiable set of `PosixFilePermission` elements that can be used to update the file's permissions."]]],["`PosixFileAttributes` defines file attributes for POSIX-compliant systems. Key actions involve retrieving file details through a `PosixFileAttributeView`. Core information accessible includes the file's group owner via `group()`, the file owner via `owner()`, and the file permissions via `permissions()`. It also inherits methods from `BasicFileAttributes` such as `creationTime()`, `size()`, `lastModifiedTime()`, `isRegularFile()`, among other file properties. Returned permission sets are modifiable.\n"]]