|
Class: FileStore
Source Location: Program_Root/File/Store.php
FileStore implements a directory layout that allows for higher performance filesystem access on very large document collections.
Author(s)
Version
- 1.2, 2003-10-26, $Id: Store.php,v 1.2 2005/07/06 15:30:56 lux Exp $
Copyright
- Copyright (C) 2001-2003, Simian Systems Inc.
|
|
|
Inherited Variables
|
Inherited Methods
|
Class Details
Class Variables
$appendMode = 'ab'
[line 189]
Sets the write mode to use in the append() method. Default is 'ab'.
Tags:
$autoInit = false
[line 153]
$autoInit determines whether you want to create the entire directory structure at once or to do so incrementally as new files are stored. This comes down to whether you care about the extra mkdir() calls on file creation, or would rather call init() once at the beginning and have it do its thing for 5-10 minutes. Defaults to false.
Tags:
$dbTable = false
[line 203]
If the $dbTable is set, FileStore will use the specified database table to maintain a list of all of the files in the repository, which can be retrieved via the listAll() method. Note: The table must be created prior to the storage repository containing any files, as FileStore does not synchronize existing files. See above for an example 'CREATE TABLE' SQL command.
Tags:
$depth = 2
[line 113]
The number of levels deep the directory structure should be set. Defaults to 2, and past that is likely very unnecessary. Consider: A depth of 2 creates 3844 directories and stores up to about 1.8 million files, and a depth of 3 creates 238,328 directories and stores up to about 120 million files (theoretically).
Tags:
$dirMode = 0755
[line 162]
Sets the directory mode to use when calling mkdir() within buildDirs() and initDir(). Default is 0755.
Tags:
$error =
[line 212]
Contains the error message if one occurs within FileStore.
Tags:
$ignoreChars = 0
[line 125]
The number of characters to ignore at the beginning of file names. Defaults to 0. This is useful when you have a collection of files that all use the same naming prefix, so that the files are still evenly distributed within the file storage system.
Tags:
$path = ''
[line 100]
The path to the root of the file store. Default is empty.
Tags:
$readMode = 'rb'
[line 180]
Sets the write mode to use in the get() method. Default is 'rb'.
Tags:
$useMD5 = false
[line 140]
If the file names are all very similar, and $ignoreChars won't solve this, then it may be useful to set $useMD5 to true (defaults to false), which makes FileStore take an MD5 string of the file name and stores it as if it was named after the MD5 string. This should produce a consistently random distribution of files, but renders the file system unviewable (or at least not easily interpreted) by other means.
Tags:
$writeMode = 'wb'
[line 171]
Sets the write mode to use in the put() method. Default is 'wb'.
Tags:
Class Methods
|
|