Solved

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

Posted on 2004-08-27
2
273 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
ID: 11918701
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
ID: 11924183
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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A short article about problems I had with the new location API and permissions in Marshmallow
Computer science students often experience many of the same frustrations when going through their engineering courses. This article presents seven tips I found useful when completing a bachelors and masters degree in computing which I believe may he…
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 …

831 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