FileDescriptionIsDirectory Property
Indicates whether file or folder.

Namespace: GroupDocs.Viewer.Domain
Assembly: GroupDocs.Viewer (in GroupDocs.Viewer.dll) Version: 19.6
Syntax
public bool IsDirectory { get; set; }

Property Value

Type: Boolean
Examples
The following example demonstrates how to determine if FileDescription object refers to the file or folder.
C#
ViewerConfig config = new ViewerConfig();
config.StoragePath = @"C:\storage";

ViewerImageHandler imageHandler = new ViewerImageHandler(config);
FileListContainer container = imageHandler.GetFileList();

foreach (FileDescription fileDescription in container.Files)
{
    if (fileDescription.IsDirectory) 
    { 
        /*is a folder*/
    }
    else 
    {
        /*is a file*/
    }
}
See Also