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


Groups > comp.os.msdos.programmer > #4173

Re: directory recursion

Newsgroups comp.os.msdos.programmer
Date 2022-08-16 13:35 -0700
References <ae4343ff-1f95-4e4c-9e5b-09365beb5ac4n@googlegroups.com> <tdg4s3$1pnp$1@gioia.aioe.org>
Message-ID <ab9a1df6-ef2c-4be2-ac42-d8fac6ec7b37n@googlegroups.com> (permalink)
Subject Re: directory recursion
From "muta...@gmail.com" <mutazilah@gmail.com>

Show all headers | View raw


On Tuesday, August 16, 2022 at 9:08:21 PM UTC+8, R.Wieser wrote:
> muta,
> > Do they make a private copy of the DTA 
> > structure and restore it?
> That is one way to do it. Another is to create a new DTA record and use 
> INT 21h, AH=1Ah to make it the active one 
> 
> You only need to save the part upto (not included) the (returned) 
> file-attribute field (at offset 0x15) though.
> > That contains all the necessary information?
> Yes, AFAIK it does. 
> 
> By the way, I most always use a function recursion to create the folder 
> recursion : when the function encounters a folder I call the function 
> itself, but with the path to the just-found folder. 
> 
> Regards, 
> Rudy Wieser

Thanks guys for your responses.

But I don't see how 1a can work.

That requires you to know how big the DTA is, right?

But the DTA could be extended at any time by
a dos vendor to e.g. include a field for long filename.

Which is exactly what was done in pdos.

Or is there another call to retrieve the length of a DTA?

Saving up to 15h seems more robust.

But what is this?

--DOS 2.x and most 3.x---
0Dh    WORD    entry count within directory
0Fh    DWORD   pointer to DTA???
13h    WORD    cluster number of start of parent directory
---PC-DOS 4.01, MS-DOS 3.2/3.3/5.0---
0Dh    WORD    entry count within directory
0Fh    WORD    cluster number of start of parent directory
11h  4 BYTEs   reserved
--

What is start of parent directory? The directory that contains this file?

Does that mean that msdos keeps going back to the first
directory cluster and then retraverses until it gets
to the required directory entry number?

I assume that is some absolute number
rather than logical, taking into account long filenames.

And with fat32, cluster numbers are 32 bit.

The reserved 4 bytes could have been used for that,
but I don't see any mention of that here:

http://www.ctyme.com/intr/rb-2977.htm

Any thoughts?

Thanks.

Back to comp.os.msdos.programmer | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

directory recursion "muta...@gmail.com" <mutazilah@gmail.com> - 2022-08-16 03:01 -0700
  Re: directory recursion "R.Wieser" <address@not.available> - 2022-08-16 15:08 +0200
    Re: directory recursion "muta...@gmail.com" <mutazilah@gmail.com> - 2022-08-16 13:35 -0700
      Re: directory recursion "R.Wieser" <address@not.available> - 2022-08-17 08:35 +0200
        Re: directory recursion "muta...@gmail.com" <mutazilah@gmail.com> - 2022-08-18 01:24 -0700
          Re: directory recursion "R.Wieser" <address@not.available> - 2022-08-18 12:06 +0200
            Re: directory recursion "muta...@gmail.com" <mutazilah@gmail.com> - 2022-08-19 00:38 -0700
              Re: directory recursion "R.Wieser" <address@not.available> - 2022-08-19 13:08 +0200
                Re: directory recursion "muta...@gmail.com" <mutazilah@gmail.com> - 2022-08-20 03:55 -0700
  Re: directory recursion Steve Nickolas <usotsuki@buric.co> - 2022-08-16 13:59 -0400

csiph-web