GroupDocsGists
10/24/2017 - 7:08 AM

Examples-GroupDocs.Viewer.Examples.CSharp-GroupDocs.Viewer.Examples-ViewGenerator-LoadFileTree.cs

            // Create/initialize image handler 
            ViewerImageHandler imageHandler = new ViewerImageHandler(Utilities.GetConfigurations());

            // Load file tree list for custom path 
            var options = new FileTreeOptions(Path);

           // Load file tree list
            FileTreeContainer container = imageHandler.LoadFileTree(options);

            foreach (var node in container.FileTree)
            {
                if (node.IsDirectory)
                {
                    Console.WriteLine("Guid: {0} | Name: {1} | LastModificationDate: {2}",
                        node.Guid,
                        node.Name,
                        node.LastModificationDate);
                }
                else
                    Console.WriteLine("Guid: {0} | Name: {1} | Document type: {2} | File type: {3} | Extension: {4} | Size: {5} | LastModificationDate: {6}",
                        node.Guid,
                        node.Name,
                        node.DocumentType,
                        node.FileType,
                        node.Extension,
                        node.Size,
                        node.LastModificationDate);
            }