Solved

visual hierarchical (expandable and contractable) display of a folder and its sub dirs and files

Posted on 2004-08-27
2
265 Views
Last Modified: 2010-04-17
Hi Guys,

I have a file with output of ls -R i.e. listing with details and recursive listing of each subdirectory

e.g. if we have dir A which has 2 dirs B and C and 3 files l, m, n
B has one dir D and 2 files x,y

i.e. we have following dir stucture

A
 |-B
    |-D
    |-x
    |-y
 |-C
 |-l
 |-m
 |-n

then ls -R will return
unixprompt% ls -lR
.:
total 0
drwxrwxr-x   2 dk  dvlpmnt       96 Aug 27 15:25     B
drwxrwxr-x   2 dk  dvlpmnt       96 Aug 27 15:24     C
-rw-rw-r--   1 dk  dvlpmnt        0 Aug 27 15:24       l
-rw-rw-r--   1 dk  dvlpmnt        0 Aug 27 15:24       m
-rw-rw-r--   1 dk  dvlpmnt        0 Aug 27 15:24       n

./B:
total 0
-rw-rw-r--   1 dk  dvlpmnt        0 Aug 27 15:25      x
-rw-rw-r--   1 dk  dvlpmnt        0 Aug 27 15:25      y

./C:
total 0

I need to create a hierarchical map that expands on pressing + sign and contracts on pressing - sign. Is there a tool which can do it? given a file of type above as input or should i write a program to do that. what would be the ideal way to do that in C/C++? I aslo need to put a column besides each folder/entry as i have to place this file at a centralized website where my team can go and edit it to enter comments.

Thanks
0
Comment
Question by:dkamdar
2 Comments
 
LVL 5

Accepted Solution

by:
rsriprac earned 300 total points
Comment Utility
Here is a nice article your should check out.  I would recommend using the TreeControl API, it will save you time

http://www.codeproject.com/treectrl/treelistctrlgerolf.asp

-Ram
0
 
LVL 3

Assisted Solution

by:teratoma
teratoma earned 200 total points
Comment Utility
recls (http://synesis.com.au/software/recls/) is a multi-platform library written mainly in C++ that contains a lot of code for getting file system info in and out of data structures.  It's insightful to look at some of that code as well as the stuff dealing with mappings to various  file system interfaces.  As far as the GUI aspect of this, GTK+ might be a good place to start:  http://www.gtk.org
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

RIA (Rich Internet Application) tools are interactive internet applications which have many of the characteristics of desktop applications. The RIA tools typically deliver output either by the way of a site-specific browser or via browser plug-in. T…
A short article about problems I had with the new location API and permissions in Marshmallow
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now