Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2004-08-27
2
Medium Priority
?
284 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
This article will show how Aten was able to supply easy management and control for Artear's video walls and wide range display configurations of their newsroom.
Six Sigma Control Plans
Progress

636 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