Language

FileSystemProvider.ReadAttributes Method

Definition

Overloads

Name Description
ReadAttributes(IPath, Class, LinkOption[])

Reads a file's attributes as a bulk operation.

ReadAttributes(IPath, String, LinkOption[])

Reads a file's attributes as a bulk operation.

ReadAttributes(IPath, Class, LinkOption[])

Reads a file's attributes as a bulk operation.

[Android.Runtime.Register("readAttributes", "(Ljava/nio/file/Path;Ljava/lang/Class;[Ljava/nio/file/LinkOption;)Ljava/nio/file/attribute/BasicFileAttributes;", "GetReadAttributes_Ljava_nio_file_Path_Ljava_lang_Class_arrayLjava_nio_file_LinkOption_Handler", ApiSince=26)]
[Java.Interop.JavaTypeParameters(new System.String[] { "A extends java.nio.file.attribute.BasicFileAttributes" })]
public abstract Java.Lang.Object? ReadAttributes(Java.Nio.FileNio.IPath? path, Java.Lang.Class? type, params Java.Nio.FileNio.LinkOption[]? options);
[<Android.Runtime.Register("readAttributes", "(Ljava/nio/file/Path;Ljava/lang/Class;[Ljava/nio/file/LinkOption;)Ljava/nio/file/attribute/BasicFileAttributes;", "GetReadAttributes_Ljava_nio_file_Path_Ljava_lang_Class_arrayLjava_nio_file_LinkOption_Handler", ApiSince=26)>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "A extends java.nio.file.attribute.BasicFileAttributes" })>]
abstract member ReadAttributes : Java.Nio.FileNio.IPath * Java.Lang.Class * Java.Nio.FileNio.LinkOption[] -> Java.Lang.Object

Parameters

path
IPath

the path to the file

type
Class

the Class of the file attributes required to read

options
LinkOption[]

options indicating how symbolic links are handled

Returns

the file attributes

Attributes

Remarks

Java documentation for java.nio.file.spi.FileSystemProvider.readAttributes(java.nio.file.Path, java.lang.Class, java.nio.file.LinkOption).

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

ReadAttributes(IPath, String, LinkOption[])

Reads a file's attributes as a bulk operation.

[Android.Runtime.Register("readAttributes", "(Ljava/nio/file/Path;Ljava/lang/String;[Ljava/nio/file/LinkOption;)Ljava/util/Map;", "GetReadAttributes_Ljava_nio_file_Path_Ljava_lang_String_arrayLjava_nio_file_LinkOption_Handler", ApiSince=26)]
public abstract System.Collections.Generic.IDictionary<string,Java.Lang.Object>? ReadAttributes(Java.Nio.FileNio.IPath? path, string? attributes, params Java.Nio.FileNio.LinkOption[]? options);
[<Android.Runtime.Register("readAttributes", "(Ljava/nio/file/Path;Ljava/lang/String;[Ljava/nio/file/LinkOption;)Ljava/util/Map;", "GetReadAttributes_Ljava_nio_file_Path_Ljava_lang_String_arrayLjava_nio_file_LinkOption_Handler", ApiSince=26)>]
abstract member ReadAttributes : Java.Nio.FileNio.IPath * string * Java.Nio.FileNio.LinkOption[] -> System.Collections.Generic.IDictionary<string, Java.Lang.Object>

Parameters

path
IPath

the path to the file

attributes
String

the attributes to read

options
LinkOption[]

options indicating how symbolic links are handled

Returns

the file attributes

Attributes

Exceptions

if the attribute view is not available

if no attributes are specified or an unrecognized attribute is specified

If an I/O error occurs

In the case of the default provider, and a security manager is installed, its checkRead method denies read access to the file. If this method is invoked to read security sensitive attributes then the security manager may be invoked to check for additional permissions.

Remarks

Reads a set of file attributes as a bulk operation. This method works in exactly the manner specified by the Files.readAttributes(Path,String,LinkOption[]) method.

Java reference for java.nio.file.spi.FileSystemProvider.readAttributes.

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