Scope: client and server, all versions.
A file store will persist items in a local file system. It requires either
path | Single top-level directory. Any required subdirectories will be made under this one. |
dataPath | Location of items |
indexPath | Location of system-built indices. |
removeEmptyFiles | Remove any empty files in the store. The default is true meaning that empty files will be deleted if found in the file store. |
Again you specify either the path or both the dataPath and indexPath.
A file-based store system is a great, easy way to set up your storage. It require nothing more than the correct permissions. Remember though that you should do the usual administrative tasks of backing it up as needed and protecting it from prying eyes since it will contain sensitive information. Both clients and servers support file stores.
<service name="default" address="https://myservice.org:8443/oauth"> <fileStore path="/var/www/storage"> <transactions/> <clients/> <clientApprovals/> </fileStore> </service>
This sets up a fully functioning service with local storage and using the default MyProxy service.
An alternate version of this would be to specify the data and index paths for each store:
<service name="default" address="https://myservice.org:8443/oauth"> <fileStore dataPath="/var/www/storage/transactions/data" indexPath="/var/www/storage/transactions/index"> <transactions/> </fileStore> <fileStore dataPath="/var/www/storage/clients/data" indexPath="/var/www/storage/clients/index"> <clients/> </fileStore> <fileStore dataPath="/var/www/storage/clientApprovals/data" indexPath="/var/www/storage/clientApprovals/index"> <clientApprovals/> </fileStore> </service>This is equivalent to the first example.
<config> <client name="my-cfg"> <fileStore path="/var/www/client/storage" removeEmptyFiles="false"> <assetStore> </fileStore> <!-- other stuff --> </config>This makes the asset store in the given directory. This will not remove empty files in the archive when it finds them.