Compartilhar via


IPath.GetName(Int32) Method

Definition

Returns a name element of this path as a Path object.

[Android.Runtime.Register("getName", "(I)Ljava/nio/file/Path;", "GetGetName_IHandler:Java.Nio.FileNio.IPathInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=26)]
public Java.Nio.FileNio.IPath? GetName (int index);
[<Android.Runtime.Register("getName", "(I)Ljava/nio/file/Path;", "GetGetName_IHandler:Java.Nio.FileNio.IPathInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=26)>]
abstract member GetName : int -> Java.Nio.FileNio.IPath

Parameters

index
Int32

the index of the element

Returns

the name element

Attributes

Remarks

Returns a name element of this path as a Path object.

The index parameter is the index of the name element to return. The element that is <em>closest</em> to the root in the directory hierarchy has index 0. The element that is <em>farthest</em> from the root has index #getNameCount count-1.

Java documentation for java.nio.file.Path.getName(int).

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