Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Files /
Chapter 2 - File Manager / File Manager Reference
Low-Level File Access Routines


Allocating File Blocks

The File Manager provides two low-level functions, PBAllocate and PBAllocContig, that allow you to allocate additional blocks to a file. The File Manager automatically allocates file blocks if you move the logical end-of-file past the physical end-of-file, and it automatically deallocates unneeded blocks from a file if you move the logical end-of-file to a position more than one allocation block before the current physical end-of-file. Consequently, you do not in general need to be concerned with allocating or deallocating file blocks. However, you can improve file block contiguity if you use the PBAllocate or PBAllocContig function to preallocate file blocks. This is most useful if you know in advance how big a file is likely to become.

PBAllocate and PBAllocContig are not supported by AppleShare volumes. Instead, use SetEOF or PBSetEOF to extend a file by setting the end-of-file.


Subtopics
PBAllocate
PBAllocContig

Previous Book Contents Book Index Next

© Apple Computer, Inc.
2 JUL 1996