Return to the Alphabetic Index
Return to the Class Browser
Return to the Picture Browser
Copyright (c) 1994 by NeXT Computer, Inc.  All Rights
Reserved.
NSByteStoreFile
Inherits From: NSByteStore : NSObject
Conforms To:	NSObject (NSObject)
Declared In:	Foundation/NSByteStore.h
Class Description
NSByteStoreFile is a subclass of NSByteStore that keeps its storage in a file.
NSByteStoreFile guarantees the integrity of stored data against process and
system crashes when protected by transactions (described in the NSByteStore
class specification), provided that the physical media remains intact. 
When you create an NSByteStoreFile, you specify a storage file and open it for
reading only or for both reading and writing. The methods you use to access the
contents of the file are implemented in NSByteStore. 
To support the use of preconfigured files, a process using an NSByteStoreFile
opened for reading only may freely modify the NSByteStoreFile; all modified
pages are reflected only in the address space of the process. The modifications
are never written to the file and are discarded when the NSByteStoreFile is
freed.
Creating and Initializing an NSByteStoreFile Instance 
-  + (NSByteStore *)byteStoreFile:(NSString*)path	Creates and
initializes an NSByteStoreFile with path as its 
transactionsEnabled:(BOOL)enable 		storage file. If enable
is YES, transactions are enabled. 
create:(BOOL)create 		If create is YES, the file
path is created. If readOnly is 
readOnly:(BOOL)readOnly		YES, path is opened for reading.
If readOnly is NO, path is opened for reading and writing.
-  -  (id)initWithPath:(NSString*)path	Initializes a newly allocated
NSByteStoreFile with path as 
transactionsEnabled:(BOOL)enable 		its storage file. If
enable is YES, transactions are 
create:(BOOL)create 		enabled. If create is YES, the file
path is created. If 
readOnly:(BOOL)readOnly		readOnly is YES, path is opened
for reading. If readOnly is NO, path is opened for reading and
writing.
Accessing the Storage File
-  - (NSString *)storePath	Returns the path of the storage file.
Reducing Memory Consumption
-  - (void)compactUntilDate:(NSDate *)limitDate	Removes free space
by relocating blocks toward the origin of the virtual address space defined by
the NSByteStoreFile. limitDate sets a time limit on this operation. No
limitDate allows the compaction to run to completion.