Important: The information in this document is obsolete and should not be used for new development.
|
|
Log In | Not a Member? |
Contact ADC |
FSClose
You can use theFSClosefunction to close an open file.
FUNCTION FSClose (refNum: Integer): OSErr;
refNum- The file reference number of an open file.
DESCRIPTION
TheFSClosefunction removes the access path for the specified file and writes the contents of the volume buffer to the volume.
- Note
- The
FSClosefunction callsPBFlushFileinternally to write the file's bytes onto the volume. To ensure that the file's catalog entry is updated, you should callFlushVolafter you callFSClose.![]()
- WARNING
- Make sure that you do not call
FSClosewith a file reference number of a file that has already been closed. Attempting to close the same file twice may result in loss of data on a volume. See "File Control Blocks" on page 2-81 for a description of how this can happen.![]()
RESULT CODES
noErr 0 No error ioErr -36 I/O error fnOpnErr -38 File not open fnfErr -43 File not found rfNumErr -51 Bad reference number
Get information on Apple products.
Visit the Apple Store online or at retail locations. 1-800-MY-APPLE Copyright © 2007 Apple Inc. All rights reserved. | Terms of use | Privacy Notice |