Solved

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

Posted on 2004-08-27
2
275 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?

756 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