home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!cs.utexas.edu!rutgers!cbmvax!cbmehq!cbmden!hemmer!hemmer
- From: hemmer@hemmer.adsp.sub.org (Franz Hemmer)
- Newsgroups: comp.sys.amiga.programmer
- Subject: Re: Quick ?
- Message-ID: <hemmer.01z3@hemmer.adsp.sub.org>
- Date: 28 Aug 92 08:32:45 GMT
- Reply-To: cbmehq!cbmden!hemmer@cbmvax.commodore.com (Franz Hemmer)
- Organization: InterActivsion
- Lines: 44
- X-NewsSoftware: GRn 1.16e (7/4/92) by Mike Schwartz & Michael B. Smith
-
- In article <1992Aug27.045116.22134@jato.jpl.nasa.gov> jdickson@jato.jpl.nasa.gov (Jeff Dickson) writes:
-
- > I was led to believe that the names of the files in a directory are
- > stored within the directory file itself. But if this is truely the case,
- > then why is a listing of that directory with the "QUICK" option hardly any
- > quicker than without?
-
- The QUICK option of List reduces the output to the file or directory names,
- not including size, data etc. as usual. The List program still goes through
- exactly the same amount of information, it only outputs less. So QUICK has
- nothing to do with the execution time.
-
- A disk structure starts with the root block. From there every directory and
- file on a disk can be derived (through linkage). Directories and files are
- chained together through a hashing mechanism, which you can read about in
- the AmigaDOS 3rd Edition manual from Bantam Books (ISBN 0-553-35403-5).
-
- > I'd like to use the ExAll function, but I'm not savy on how large a
- > buffer to supply. Ideally, the buffer would only be as large as need be. So
- > for instance, if I were interested in only obtaining the names contained in
- > a directory would fib_Size reflect at least how large that buffer needed to
- > be?
-
- fib_Size reflects the size of the file examined. It has nothing to do with the
- amount of buffer you need to hold for the entire directory. When you examine
- a directory you need to allocate `sizeof (struct FileInfoBlock)' for each file
- or directory encountered. If you're only interested in part of the information
- contained in the FileInfoBlock say the size of the file, one FileInfoBlock
- allocation will suffice. You can then copy the size values to your own size
- buffer, or just add them up (or whatever your purpose is :-). All information
- about the file or directory can then be found in the FileInfoBlock structure.
-
- > Any help much appreciated.
-
- Hope this clarified a bit.
-
- --
- *-------------------------------------------------------------------------*
- | _ UseNet: (uunet|rutgers|pyramid)!cbmvax!cbmehq!cbmden!hemmer |
- | \\ _ CBMNET: hemmer@hemmer.adsp.sub.org |
- | InterActi\X/ision - The name of precision |
- | Best regards >> Carpe Diem! - Seize the day! << |
- | Franz Hemmer - Software Developer located in Silkeborg, Denmark, Europe |
- *-------------------------------------------------------------------------*
-