FileStore.GetAttribute(String) Method

Definition

Reads the value of a file store attribute.

[Android.Runtime.Register("getAttribute", "(Ljava/lang/String;)Ljava/lang/Object;", "GetGetAttribute_Ljava_lang_String_Handler", ApiSince=26)]
public abstract Java.Lang.Object? GetAttribute (string? attribute);
[<Android.Runtime.Register("getAttribute", "(Ljava/lang/String;)Ljava/lang/Object;", "GetGetAttribute_Ljava_lang_String_Handler", ApiSince=26)>]
abstract member GetAttribute : string -> Java.Lang.Object

Parameters

attribute
String

the attribute to read

Returns

the attribute value; null may be valid for some attributes

Attributes

Remarks

Reads the value of a file store attribute.

The attribute parameter identifies the attribute to be read and takes the form: <blockquote> view-name<b>:</b>attribute-name</blockquote> where the character ':' stands for itself.

view-name is the FileStoreAttributeView#name name of a FileStore AttributeView that identifies a set of file attributes. attribute-name is the name of the attribute.

<b>Usage Example:</b> Suppose we want to know if ZFS compression is enabled (assuming the "zfs" view is supported):

boolean compression = (Boolean)fs.getAttribute("zfs:compression");

Java documentation for java.nio.file.FileStore.getAttribute(java.lang.String).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to