IPath.EndsWith Method

Definition

Overloads

EndsWith(IPath)

Tests if this path ends with the given path.

EndsWith(String)

Tests if this path ends with a Path, constructed by converting the given path string, in exactly the manner specified by the #endsWith(Path) endsWith(Path) method.

EndsWith(IPath)

Tests if this path ends with the given path.

[Android.Runtime.Register("endsWith", "(Ljava/nio/file/Path;)Z", "GetEndsWith_Ljava_nio_file_Path_Handler:Java.Nio.FileNio.IPathInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=26)]
public bool EndsWith (Java.Nio.FileNio.IPath? other);
[<Android.Runtime.Register("endsWith", "(Ljava/nio/file/Path;)Z", "GetEndsWith_Ljava_nio_file_Path_Handler:Java.Nio.FileNio.IPathInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=26)>]
abstract member EndsWith : Java.Nio.FileNio.IPath -> bool

Parameters

other
IPath

the given path

Returns

true if this path ends with the given path; otherwise false

Attributes

Remarks

Tests if this path ends with the given path.

If the given path has <em>N</em> elements, and no root component, and this path has <em>N</em> or more elements, then this path ends with the given path if the last <em>N</em> elements of each path, starting at the element farthest from the root, are equal.

If the given path has a root component then this path ends with the given path if the root component of this path <em>ends with</em> the root component of the given path, and the corresponding elements of both paths are equal. Whether or not the root component of this path ends with the root component of the given path is file system specific. If this path does not have a root component and the given path has a root component then this path does not end with the given path.

If the given path is associated with a different FileSystem to this path then false is returned.

Java documentation for java.nio.file.Path.endsWith(java.nio.file.Path).

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

EndsWith(String)

Tests if this path ends with a Path, constructed by converting the given path string, in exactly the manner specified by the #endsWith(Path) endsWith(Path) method.

[Android.Runtime.Register("endsWith", "(Ljava/lang/String;)Z", "GetEndsWith_Ljava_lang_String_Handler:Java.Nio.FileNio.IPathInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=26)]
public bool EndsWith (string? other);
[<Android.Runtime.Register("endsWith", "(Ljava/lang/String;)Z", "GetEndsWith_Ljava_lang_String_Handler:Java.Nio.FileNio.IPathInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=26)>]
abstract member EndsWith : string -> bool

Parameters

other
String

the given path string

Returns

true if this path ends with the given path; otherwise false

Attributes

Remarks

Tests if this path ends with a Path, constructed by converting the given path string, in exactly the manner specified by the #endsWith(Path) endsWith(Path) method. On UNIX for example, the path "foo/bar" ends with "foo/bar" and "bar". It does not end with "r" or "/bar". Note that trailing separators are not taken into account, and so invoking this method on the Path"foo/bar" with the String "bar/" returns true.

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