Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #9437

Re: Representing a hierarchical file system

From jacob navia <jacob@spamsink.net>
Newsgroups comp.lang.c
Subject Re: Representing a hierarchical file system
Date 2011-08-15 19:46 +0200
Organization lccwin
Message-ID <j2bm0p$14f$3@speranza.aioe.org> (permalink)
References <j2as5n$4gl$1@speranza.aioe.org> <chine.bleu-2A8469.10350815082011@news.eternal-september.org>

Show all headers | View raw


Le 15/08/11 19:35, China Blue Tip Wrench a écrit :
> In article<j2as5n$4gl$1@speranza.aioe.org>, jacob navia<jacob@spamsink.net>
> wrote:
>
>> typedef struct tagDirectory {
>> 	char *Name;
>> 	size_t NumberOfChildren;
>> 	struct tagDirectory **Subdirs;
>> 	size_t NumberOfFiles;
>> 	file **Files;
>> }Directory;
>
> Unix doesn't distinguish files and subdirectories in a directory. To get that
> you need an additional call for each entry (stat). If you're going to stat, you
> might want to save the information to avoid redundant stat calls. Also the
> directory graph can be cyclic when you follow soft links.
>

I would rather ignore links, and avoid anything Unix specific (or DOS 
specific)

Just a simple hierarchical representation with some attibutes like size
and time

I would like it to be as portable as possible

Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Representing a hierarchical file system jacob navia <jacob@spamsink.net> - 2011-08-15 12:24 +0200
  Re: Representing a hierarchical file system Ian Collins <ian-news@hotmail.com> - 2011-08-15 22:36 +1200
    Re: Representing a hierarchical file system jacob navia <jacob@spamsink.net> - 2011-08-15 19:43 +0200
  Re: Representing a hierarchical file system Keith Thompson <kst-u@mib.org> - 2011-08-15 09:23 -0700
    Re: Representing a hierarchical file system David Thompson <dave.thompson2@verizon.net> - 2011-08-21 03:22 -0400
  Re: Representing a hierarchical file system Nobody <nobody@nowhere.com> - 2011-08-15 18:02 +0100
    Re: Representing a hierarchical file system jacob navia <jacob@spamsink.net> - 2011-08-15 19:44 +0200
  Re: Representing a hierarchical file system China Blue Tip Wrench <chine.bleu@yahoo.com> - 2011-08-15 10:35 -0700
    Re: Representing a hierarchical file system jacob navia <jacob@spamsink.net> - 2011-08-15 19:46 +0200
      Re: Representing a hierarchical file system "Heinrich Wolf" <invalid@invalid.invalid> - 2011-08-15 20:31 +0200
      Re: Representing a hierarchical file system Ian Collins <ian-news@hotmail.com> - 2011-08-16 08:32 +1200
      Re: Representing a hierarchical file system Nobody <nobody@nowhere.com> - 2011-08-16 11:45 +0100
        Re: Representing a hierarchical file system BGB <cr88192@hotmail.com> - 2011-08-16 04:00 -0700

csiph-web