Class: Ferret::Store::Directory
- Inherits:
-
Object
- Object
- Ferret::Store::Directory
- Defined in:
- ext/r_store.c
Overview
A Directory is an object which is used to access the index storage. Ruby’s IO API is not used so that we can use different storage mechanisms to store the index. Some examples are;
-
File system based storage (currently implemented as FSDirectory)
-
RAM based storage (currently implemented as RAMDirectory)
-
Database based storage
NOTE: Once a file has been written and closed, it can no longer be modified. To make any changes to the file it must be deleted and rewritten. For this reason, the method to open a file for writing is called create_output, while the method to open a file for reading is called open_input If there is a risk of simultaneous modifications of the files then locks should be used. See Lock to find out how.