Partager via


Files.IsSymbolicLink(IPath) Method

Definition

Tests whether a file is a symbolic link.

[Android.Runtime.Register("isSymbolicLink", "(Ljava/nio/file/Path;)Z", "", ApiSince=26)]
public static bool IsSymbolicLink (Java.Nio.FileNio.IPath? path);
[<Android.Runtime.Register("isSymbolicLink", "(Ljava/nio/file/Path;)Z", "", ApiSince=26)>]
static member IsSymbolicLink : Java.Nio.FileNio.IPath -> bool

Parameters

path
IPath

The path to the file

Returns

true if the file is a symbolic link; false if the file does not exist, is not a symbolic link, or it cannot be determined if the file is a symbolic link or not.

Attributes

Remarks

Tests whether a file is a symbolic link.

Where it is required to distinguish an I/O exception from the case that the file is not a symbolic link then the file attributes can be read with the #readAttributes(Path,Class,LinkOption[]) readAttributes method and the file type tested with the BasicFileAttributes#isSymbolicLink method.

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