?
Solved

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

Posted on 2004-08-27
2
Medium Priority
?
281 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 5

Accepted Solution

by:
rsriprac earned 900 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 600 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

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
The SignAloud Glove is capable of translating American Sign Language signs into text and audio.
Progress
Starting up a Project
Suggested Courses

764 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