IPath.StartsWith Method

Definition

Overloads

StartsWith(IPath)

Tests if this path starts with the given path.

StartsWith(String)

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

StartsWith(IPath)

Tests if this path starts with the given path.

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

Parameters

other
IPath

the given path

Returns

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

Attributes

Remarks

Tests if this path starts with the given path.

This path <em>starts</em> with the given path if this path's root component <em>starts</em> with the root component of the given path, and this path starts with the same name elements as the given path. If the given path has more name elements than this path then false is returned.

Whether or not the root component of this path starts 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 start 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.startsWith(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

StartsWith(String)

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

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

Parameters

other
String

the given path string

Returns

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

Attributes

Remarks

Tests if this path starts with a Path, constructed by converting the given path string, in exactly the manner specified by the #startsWith(Path) startsWith(Path) method. On UNIX for example, the path "foo/bar" starts with "foo" and "foo/bar". It does not start with "f" or "fo".

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