Files.ReadAttributes Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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;", "", ApiSince=26)]
[Java.Interop.JavaTypeParameters(new System.String[] { "A extends java.nio.file.attribute.BasicFileAttributes" })]
public static 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;", "", ApiSince=26)>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "A extends java.nio.file.attribute.BasicFileAttributes" })>]
static 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
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;", "", ApiSince=26)]
public static 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;", "", ApiSince=26)>]
static 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
Java reference for java.nio.file.Files.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.