Symbian3/SDK/Source/GUID-21CF1D5F-44C5-5407-B3C9-8BC103C97079.dita
author Dominic Pinkman <Dominic.Pinkman@Nokia.com>
Thu, 21 Jan 2010 18:18:20 +0000
changeset 0 89d6a7a84779
permissions -rw-r--r--
Initial contribution of Documentation_content according to Feature bug 1266 bug 1268 bug 1269 bug 1270 bug 1372 bug 1374 bug 1375 bug 1379 bug 1380 bug 1381 bug 1382 bug 1383 bug 1385

<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
<!-- This component and the accompanying materials are made available under the terms of the License 
"Eclipse Public License v1.0" which accompanies this distribution, 
and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
<!-- Initial Contributors:
    Nokia Corporation - initial contribution.
Contributors: 
-->
<!DOCTYPE concept
  PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
<concept xml:lang="en" id="GUID-21CF1D5F-44C5-5407-B3C9-8BC103C97079"><title>File Stores Overview</title><prolog><metadata><keywords/></metadata></prolog><conbody><section><title>Purpose</title> <p>Provides file-based structured data storage, using networks of streams.</p> </section> <section><title>Architectural relationships</title> <p>The File Stores API is based on the abstract store types defined by the Stores API. The underlying file handling is provided by the File Server.</p> <p>The permanent file stores defined in this API are used by the relational database API, DBMS, for data storage.</p> </section> <section><title>Description</title> <p>The API has five key concepts: file store base (<codeph>CFileStore</codeph>), direct file store (<codeph>CDirectFileStore</codeph>), permanent file store (<codeph>CPermanentFileStore</codeph>), dictionary file store (<codeph>CDictionaryFileStore</codeph>), and file streams (<codeph>RFileWriteStream</codeph> and <codeph>RFileReadStream</codeph>).</p> <p><b>File store base</b> </p> <p>This abstract base class provides basic behaviour for file stores, such as reading a store from a specified file. </p> <p>File stores are derived from the persistent store base (<codeph>CPersistentStore</codeph>) provided by the Stores API. This means that they have a root stream, from which all other streams within the store can be found.</p> <p>The file store base class is <codeph>CFileStore</codeph>.</p> <p><b>Direct file store</b> </p> <p>A direct file store implements a file store in which once the streams have been committed and closed, they cannot subsequently be changed. They are used by the type of application that treats the in-memory copy of its data as its prime copy, and on saving, replaces the entire store. </p> <p>The direct file store is a concrete type, derived from <codeph>CFileStore</codeph>, and is provided by <codeph>CDirectFileStore</codeph>.</p> <p><b>Permanent file store</b> </p> <p>A permanent file store implements a file store in which existing streams within the store can be changed. They are used by the type of application which treats the data in the store as its prime copy. Typically, the object network comprising the application’s data is structured so that sections of data can be loaded in, and, if changed, written back to the store. Memory is used as a workplace for changing data.</p> <p>The permanent file store is a concrete type, derived from <codeph>CFileStore</codeph>, and is provided by <codeph>CPermanentFileStore</codeph>.</p> <p><b>Dictionary file store</b> </p> <p>The dictionary file store implements a dictionary store, a network of streams each of which can be accessed via a UID, in file storage.</p> <p>The dictionary file store is a concrete type, derived from <codeph>CDictionaryStore</codeph>, and is provided by <codeph>CDictionaryFileStore</codeph>.</p> <p><b>File streams</b> </p> <p>File streams allow standard files (<xref href="GUID-BE0804F6-4375-3C8A-8C83-968F510466E0.dita"><apiname>RFile</apiname></xref> objects as defined in the File Server Client Side API), not file stores, to be written to as streams. This can be simpler and more efficient than using the equivalent <xref href="GUID-BE0804F6-4375-3C8A-8C83-968F510466E0.dita"><apiname>RFile</apiname></xref> functions. </p> <p>The file stream classes are <codeph>RFileReadStream</codeph> and <codeph>RFileWriteStream</codeph>.</p> </section> <section><title>See also</title> <p><xref href="GUID-13C95985-D16F-5A9E-A7F8-CAB637C4C6ED.dita#GUID-13C95985-D16F-5A9E-A7F8-CAB637C4C6ED/GUID-844F756E-1670-5D24-8D63-2092ABE3354C">DBMS Overview</xref> </p> <p><xref href="GUID-B69FE02E-3A78-5438-BA7C-F7BB4CD3EB76.dita">File Server Client Side Overview</xref> </p> <p><xref href="GUID-744ACF2C-963B-5E2F-A6B3-220AB899FD23.dita">Streaming Overview</xref> </p> <p><xref href="GUID-66ACFC54-5671-5B72-9DBC-A76F7A112D63.dita">Store Streams Overview</xref> </p> <p><xref href="GUID-5EAED550-5FFC-54A6-BB4A-720975B127B8.dita">Stores Overview</xref> </p> </section> </conbody></concept>