home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!caen!kuhub.cc.ukans.edu!wsuhub.uc.twsu.edu!rgshacke
- Newsgroups: comp.sys.apple2
- Subject: Re: How many files in a ProDOS directory ?
- Message-ID: <1992Aug13.164415.44@wsuhub.uc.twsu.edu>
- From: rgshacke@wsuhub.uc.twsu.edu (Randy)
- Date: 13 Aug 92 16:44:15 CST
- References: <1992Aug7.044656.4138@cs.uow.edu.au> <41DDPB24w165w@bluemoon.rn.com>
- Organization: Wichita State University, Wichita, Ks
- Lines: 50
-
- In article <41DDPB24w165w@bluemoon.rn.com>, djredick@bluemoon.rn.com (Darrin J. Redick) writes:
- > david@cs.uow.edu.au (David E A Wilson) writes:
- >
- >> gberigan@cse.unl.edu (Life...) writes:
- >> >Hmm, you just gave me a thought, which prompts me to create a
- >> >subdirectory of infinite size, using that nice tool we know as
- >> >recursion.... How many files would be printed before the system
- >> >crashes? :-)
- >>
- >> If you use recursion you will run out of path length (/X/X/X.....).
- >> Iteration will be sufficient (/X/X00000 /X/X00001 .....).
- >>
- >> It is quite easy to calculate where this will run out. A 32MB disk (65535 blk
- >> has 16 blocks for the bit map, 2 for booting from & 4 for the volume director
- >> Creating a subdirectory uses another block. Each file we create in that
- >> directory (assuming we make them as small as possible) will use 1 block and
- >> each 13 will require an extra subdirectory block. This works out at about 608
- do you really mean 608? ^^
- >> files and will take a very long time to complete (the directory will be 4680
- >> blocks long and searched linearly).
- >>
- >> No - I do not intend trying this out to verify my calculations :-).
- >> --
- >> David Wilson (042) 21 3802 voice, (042) 21 3262 fax
- >> Dept Comp Sci, Uni of Wollongong david@cs.uow.edu.au
-
- I just did a quick experiment - I created a directory on my 1024 block RAM
- disk, set the prefix to it, and ran this program:
-
- 1 print chr$(4)"save file"x
- 2 print x" ";
- 3 x=x+1
- 4 goto 1
-
- When the disk space was used up, I had 943 copies of my program, and the
- directory was 73 blocks.
-
- > Yea, good luck in getting Cat Doctor to catalog it! It will NOT catalog
- > any directory which has more than 255 files in it. I had this happen to
- > me a few days ago, so I know from personal experience about this. AGATE
- > craps out as well. Don't know about ProTERM, though. Copy II Plus works.
-
- When my program stopped with DISK FULL, I tried to catalog the directory.
- Both BASIC and my homemade version of ECP8 with the catalog routine rewritten
- by yours truly could do the entire directory. Cat Doctor didn't even try, and
- Proterm locked up big time, forcing me to reboot. This goes to show that trying
- to have the entire directory in memory at the same time is a bad idea.
- --
- Randy Shackelford "That's right, just keep tap dancing
- rgshacke@wsuhub.uc.twsu.edu on the minefield" - Al Bundy
-