File.IsDirectory Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Tests whether the file denoted by this abstract pathname is a directory.
public virtual bool IsDirectory { [Android.Runtime.Register("isDirectory", "()Z", "GetIsDirectoryHandler")] get; }
[<get: Android.Runtime.Register("isDirectory", "()Z", "GetIsDirectoryHandler")>]
member this.IsDirectory : bool
Property Value
true
if and only if the file denoted by this
abstract pathname exists <em>and</em> is a directory;
false
otherwise
- Attributes
Remarks
Tests whether the file denoted by this abstract pathname is a directory.
Where it is required to distinguish an I/O exception from the case that the file is not a directory, or where several attributes of the same file are required at the same time, then the java.nio.file.Files#readAttributes(Path,Class,LinkOption[]) Files.readAttributes
method may be used.
Java documentation for java.io.File.isDirectory()
.
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.