다음을 통해 공유


IPath.Subpath(Int32, Int32) Method

Definition

Returns a relative Path that is a subsequence of the name elements of this path.

[Android.Runtime.Register("subpath", "(II)Ljava/nio/file/Path;", "GetSubpath_IIHandler:Java.Nio.FileNio.IPathInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=26)]
public Java.Nio.FileNio.IPath? Subpath (int beginIndex, int endIndex);
[<Android.Runtime.Register("subpath", "(II)Ljava/nio/file/Path;", "GetSubpath_IIHandler:Java.Nio.FileNio.IPathInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=26)>]
abstract member Subpath : int * int -> Java.Nio.FileNio.IPath

Parameters

beginIndex
Int32

the index of the first element, inclusive

endIndex
Int32

the index of the last element, exclusive

Returns

a new Path object that is a subsequence of the name elements in this Path

Attributes

Remarks

Returns a relative Path that is a subsequence of the name elements of this path.

The beginIndex and endIndex parameters specify the subsequence of name elements. The name that is <em>closest</em> to the root in the directory hierarchy has index 0. The name that is <em>farthest</em> from the root has index #getNameCount count-1. The returned Path object has the name elements that begin at beginIndex and extend to the element at index endIndex-1.

Java documentation for java.nio.file.Path.subpath(int, 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