Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

Public Member Functions | Static Public Member Functions | Public Attributes | Private Member Functions | List of all members
eZFSFileHandler Class Reference
Inheritance diagram for eZFSFileHandler:

## Public Member Functions
| __construct ( $filePath=false)
| loadMetaData ( $force=false)
| fileFetch ( $filePath)
| fetch ( $noLocalCache=false)
| fetchUnique ()
| fileStore ( $filePath, $scope=false, $delete=false, $datatype=false)
| storeContents ( $contents, $scope=false, $datatype=false, $storeLocally=false)
| fileFetchContents ( $filePath)
| fetchContents ()
| processCache ( $retrieveCallback, $generateCallback=null, $ttl=null, $expiry=null, $extraData=null)
| isExpired ( $expiry, $curtime, $ttl)
| processFile ( $callback, $expiry=false, $extraData=null)
| stat ()
| size ()
| dataType ()
| mtime ()
| name ()
| fileDeleteLocal ( $path)
| deleteLocal ()
| purge ( $printCallback=false, $microsleep=false, $max=false, $expiry=false)
| exists ()
| passthrough ( $offset=0, $length=false)
| move ( $dstPath)
| startCacheGeneration ()
| endCacheGeneration ( $rename=true)
| abortCacheGeneration ()
| checkCacheGenerationTimeout ()
| requiresClusterizing ()
| requiresPurge ()
| hasStaleCacheSupport ()
| getFileList ($scopes=false, $excludeScopes=false)
| isDBFileExpired ($expiry, $curtime, $ttl)
| isLocalFileExpired ($expiry, $curtime, $ttl)
| applyServerUri ( $filePath)
Public Member Functions inherited from eZClusterFileHandlerInterface
| passthrough ()
| storeCache ( $fileData)

## Static Public Member Functions
| fileStoreContents ( $filePath, $contents, $scope=false, $datatype=false)
static | isFileExpired ( $fname, $mtime, $expiry, $curtime, $ttl)
| fileDeleteByWildcard ( $wildcard)
| fileDeleteByDirList ( $dirList, $commonPath, $commonSuffix)
| fileDelete ( $path, $fnamePart=false)
| delete ()
| fileExists ( $path)
| fileCopy ( $srcPath, $dstPath)
| fileLinkCopy ( $srcPath, $dstPath, $symLink)
| fileMove ( $srcPath, $dstPath)

## Public Attributes
const | EXPIRY_TIMESTAMP = 233366400
| $metaData = null
| $filePath
| $Mutex
| $lifetime

## Private Member Functions
| _exclusiveLock ( $fname=false)
| _freeExclusiveLock ( $fname=false)
& | _mutex ()
| storeCache ( $fileData, $storeCache=true)

## Detailed Description

Definition at line 12 of file ezfsfilehandler.php.

## Constructor & Destructor Documentation

## ◆ __construct()

eZFSFileHandler::__construct | ( |  | $filePath = `false` | ) |

Constructor.

Parameters

  bool | $filePath | File path. If specified, file metadata is fetched in the constructor.

Definition at line 21 of file ezfsfilehandler.php.

References $filePath, loadMetaData(), and eZDebugSetting\writeDebug().

## Member Function Documentation

## ◆ _exclusiveLock()

eZFSFileHandler::_exclusiveLock | ( |  | $fname = `false` | ) |
| private

Acquires an exclusive lock to the current file by using eZMutex.

If a lock is already present it will sleep 0.5 seconds and try again until the lock lifetime is exceeded and the lock is stolen.

Note: Lock stealing might be removed.

Parameters

  $fname | Name of the calling code (usually function name).

Definition at line 41 of file ezfsfilehandler.php.

References $timestamp, _mutex(), and eZDebug\writeWarning().

Referenced by processCache().

## ◆ _freeExclusiveLock()

eZFSFileHandler::_freeExclusiveLock | ( |  | $fname = `false` | ) |
| private

Frees the current exclusive lock in use.

Parameters

  $fname | Name of the calling code (usually function name).

Definition at line 86 of file ezfsfilehandler.php.

References _mutex().

Referenced by abortCacheGeneration(), processCache(), and storeCache().

## ◆ _mutex()

& eZFSFileHandler::_mutex | ( |  | ) |
| private

Returns the mutex object for the current file.

Definition at line 96 of file ezfsfilehandler.php.

References $Mutex.

Referenced by _exclusiveLock(), and _freeExclusiveLock().

## ◆ abortCacheGeneration()

eZFSFileHandler::abortCacheGeneration | ( |  | ) |

Aborts the current cache generation process.

Does so by rolling back the current transaction, which should be the .generating file lock

Implements eZClusterFileHandlerInterface.

Definition at line 964 of file ezfsfilehandler.php.

References _freeExclusiveLock().

Referenced by storeCache().

## ◆ applyServerUri()

eZFSFileHandler::applyServerUri | ( |  | $filePath | ) |

No transformation is required since files are served from the same host

Implements eZClusterFileHandlerInterface.

Definition at line 1026 of file ezfsfilehandler.php.

References $filePath.

## ◆ checkCacheGenerationTimeout()

eZFSFileHandler::checkCacheGenerationTimeout | ( |  | ) |

Checks if the .generating file was changed, which would mean that generation timed out. If not timed out, refreshes the timestamp so that storage won't be stolen

Implements eZClusterFileHandlerInterface.

Definition at line 976 of file ezfsfilehandler.php.

## ◆ dataType()

eZFSFileHandler::dataType | ( |  | ) |

Returns file mime-type / content-type.

Returns
  string|null

Implements eZClusterFileHandlerInterface.

Definition at line 584 of file ezfsfilehandler.php.

References eZDebugSetting\writeDebug().

## ◆ delete()

eZFSFileHandler::delete | ( |  | ) |
| static

Deletes specified file/directory.

If a directory specified it is deleted recursively.

Implements eZClusterFileHandlerInterface.

Definition at line 714 of file ezfsfilehandler.php.

References $filePath, eZDebug\accumulatorStart(), eZDebug\accumulatorStop(), eZClusterFileHandler\cleanupEmptyDirectories(), file_exists(), eZFileHandler\instance(), loadMetaData(), eZDir\recursiveDelete(), eZDebugSetting\writeDebug(), and eZDebug\writeError().

## ◆ deleteLocal()

eZFSFileHandler::deleteLocal | ( |  | ) |

Deletes a file that has been fetched before.

In case of fetching from filesystem does nothing.

Implements eZClusterFileHandlerInterface.

Definition at line 760 of file ezfsfilehandler.php.

References $filePath, and eZDebugSetting\writeDebug().

## ◆ endCacheGeneration()

eZFSFileHandler::endCacheGeneration | ( |  | $rename = `true` | ) |

Ends the cache generation started by startCacheGeneration().

Implements eZClusterFileHandlerInterface.

Definition at line 953 of file ezfsfilehandler.php.

## ◆ exists()

eZFSFileHandler::exists | ( |  | ) |

Check if given file/dir exists.

NOTE: this function does not interact with filesystem. Instead, it just returns existance status determined in the constructor.

Implements eZClusterFileHandlerInterface.

Definition at line 848 of file ezfsfilehandler.php.

References $filePath, and eZDebugSetting\writeDebug().

## ◆ fetch()

eZFSFileHandler::fetch | ( |  | $noLocalCache = `false` | ) |

Fetches file from db and saves it in FS under the same name.

In case of fetching from filesystem does nothing.

Implements eZClusterFileHandlerInterface.

Definition at line 142 of file ezfsfilehandler.php.

References $filePath, and eZDebugSetting\writeDebug().

## ◆ fetchContents()

eZFSFileHandler::fetchContents | ( |  | ) |

Returns file contents.

Returns
  contents string, or false in case of an error.

Implements eZClusterFileHandlerInterface.

Definition at line 242 of file ezfsfilehandler.php.

References $filePath, eZDebug\accumulatorStart(), eZDebug\accumulatorStop(), and eZDebugSetting\writeDebug().

## ◆ fetchUnique()

eZFSFileHandler::fetchUnique | ( |  | ) |

Fetches file from db and saves it in FS under unique name.

In case of fetching from filesystem, does nothing

Returns
  string The unique file path. on FS, the file path.

Implements eZClusterFileHandlerInterface.

Definition at line 155 of file ezfsfilehandler.php.

References $filePath, and eZDebugSetting\writeDebug().

## ◆ fileCopy()

eZFSFileHandler::fileCopy | ( |  | $srcPath,
|  |  | $dstPath
| ) |  |
| static

Copy file.

Implements eZClusterFileHandlerInterface.

Definition at line 879 of file ezfsfilehandler.php.

References eZDebug\accumulatorStart(), eZDebug\accumulatorStop(), eZFileHandler\copy(), and eZDebugSetting\writeDebug().

## ◆ fileDelete()

eZFSFileHandler::fileDelete | ( |  | $path,
|  |  | $fnamePart = `false`
| ) |  |
| static

Deletes specified file/directory.

If a directory specified it is deleted recursively.

Implements eZClusterFileHandlerInterface.

Definition at line 664 of file ezfsfilehandler.php.

References eZDebug\accumulatorStart(), eZDebug\accumulatorStop(), file_exists(), eZFileHandler\instance(), eZDir\recursiveDelete(), eZDebugSetting\writeDebug(), and eZDebug\writeError().

## ◆ fileDeleteByDirList()

eZFSFileHandler::fileDeleteByDirList | ( |  | $dirList,
|  |  | $commonPath,
|  |  | $commonSuffix
| ) |  |
| static

Delete files located in a directories from dirList, with common prefix specified by commonPath, and common suffix with added wildcard at the end

Implements eZClusterFileHandlerInterface.

Definition at line 642 of file ezfsfilehandler.php.

References $dir, eZDebug\accumulatorStart(), eZDebug\accumulatorStop(), eZSys\globBrace(), and eZDebugSetting\writeDebug().

## ◆ fileDeleteByWildcard()

eZFSFileHandler::fileDeleteByWildcard | ( |  | $wildcard | ) |
| static

Delete files matching given wildcard.

Implements eZClusterFileHandlerInterface.

Definition at line 621 of file ezfsfilehandler.php.

References eZDebug\accumulatorStart(), eZDebug\accumulatorStop(), eZSys\globBrace(), and eZDebugSetting\writeDebug().

## ◆ fileDeleteLocal()

eZFSFileHandler::fileDeleteLocal | ( |  | $path | ) |

Deletes a file that has been fetched before.

See also
  fetchUnique

In case of fetching from filesystem does nothing.

Implements eZClusterFileHandlerInterface.

Definition at line 748 of file ezfsfilehandler.php.

References eZDebugSetting\writeDebug().

## ◆ fileExists()

eZFSFileHandler::fileExists | ( |  | $path | ) |
| static

Check if given file/dir exists.

Implements eZClusterFileHandlerInterface.

Definition at line 829 of file ezfsfilehandler.php.

References eZDebug\accumulatorStart(), eZDebug\accumulatorStop(), file_exists(), and eZDebugSetting\writeDebug().

## ◆ fileFetch()

eZFSFileHandler::fileFetch | ( |  | $filePath | ) |

Fetches file from db and saves it in FS under the same name.

In case of fetching from filesystem does nothing.

Implements eZClusterFileHandlerInterface.

Definition at line 131 of file ezfsfilehandler.php.

References $filePath, file_exists(), and eZDebugSetting\writeDebug().

## ◆ fileFetchContents()

eZFSFileHandler::fileFetchContents | ( |  | $filePath | ) |

Returns file contents.

Returns
  string|false contents string, or false in case of an error.

Implements eZClusterFileHandlerInterface.

Definition at line 225 of file ezfsfilehandler.php.

References $filePath, eZDebug\accumulatorStart(), eZDebug\accumulatorStop(), and eZDebugSetting\writeDebug().

## ◆ fileLinkCopy()

eZFSFileHandler::fileLinkCopy | ( |  | $srcPath,
|  |  | $dstPath,
|  |  | $symLink
| ) |  |
| static

Create symbolic or hard link to file.

Implements eZClusterFileHandlerInterface.

Definition at line 894 of file ezfsfilehandler.php.

References eZDebug\accumulatorStart(), eZDebug\accumulatorStop(), eZFileHandler\linkCopy(), and eZDebugSetting\writeDebug().

## ◆ fileMove()

eZFSFileHandler::fileMove | ( |  | $srcPath,
|  |  | $dstPath
| ) |  |
| static

Move file.

Implements eZClusterFileHandlerInterface.

Definition at line 909 of file ezfsfilehandler.php.

References eZDebug\accumulatorStart(), eZDebug\accumulatorStop(), eZFile\rename(), and eZDebugSetting\writeDebug().

## ◆ fileStore()

eZFSFileHandler::fileStore | ( |  | $filePath,
|  |  | $scope = `false`,
|  |  | $delete = `false`,
|  |  | $datatype = `false`
| ) |  |

Store file.

In case of storing to filesystem does nothing.

Parameters

  string | $filePath | Path to the file being stored.
  string | $scope | Means something like "file category". May be used to clean caches of a certain type.
  string | $delete | true if the file should be deleted after storing.

Implements eZClusterFileHandlerInterface.

Definition at line 170 of file ezfsfilehandler.php.

References eZDebugSetting\writeDebug().

## ◆ fileStoreContents()

eZFSFileHandler::fileStoreContents | ( |  | $filePath,
|  |  | $contents,
|  |  | $scope = `false`,
|  |  | $datatype = `false`
| ) |  |
| static

Store file contents.

Implements eZClusterFileHandlerInterface.

Definition at line 181 of file ezfsfilehandler.php.

References $contents, $filePath, eZDebug\accumulatorStart(), eZDebug\accumulatorStop(), eZFile\create(), and eZDebugSetting\writeDebug().

## ◆ getFileList()

eZFSFileHandler::getFileList | ( |  | $scopes = `false`,
|  |  | $excludeScopes = `false`
| ) |  |

Get list of files stored in database.

Used in bin/php/clusterize.php.

Parameters

  array | $scopes | return only files that belong to any of these scopes
  boolean | $excludeScopes | if true, then reverse the meaning of $scopes, which is return only files that do not belong to any of the scopes listed in $scopes

Implements eZClusterFileHandlerInterface.

Definition at line 1008 of file ezfsfilehandler.php.

## ◆ hasStaleCacheSupport()

eZFSFileHandler::hasStaleCacheSupport | ( |  | ) |

Indicates if the handler supports the stalecache feature

Returns
  bool true if it does, false otherwise

Implements eZClusterFileHandlerInterface.

Definition at line 1003 of file ezfsfilehandler.php.

## ◆ isDBFileExpired()

eZFSFileHandler::isDBFileExpired | ( |  | $expiry,
|  |  | $curtime,
|  |  | $ttl
| ) |  |

Calculates if the DB file is expired or not.

Parameters

  int | $expiry | Time when file is to be expired, a value of -1 will disable this check.
  int | $curtime | The current time to check against.
  int | $ttl | Number of seconds the data can live, set to null to disable TTL.

Returns
  bool

Implements eZClusterFileHandlerInterface.

Definition at line 1013 of file ezfsfilehandler.php.

References isFileExpired().

## ◆ isExpired()

eZFSFileHandler::isExpired | ( |  | $expiry,
|  |  | $curtime,
|  |  | $ttl
| ) |  |

Calculates if the current file data is expired or not.

Parameters

  int | $expiry | Time when file is to be expired, a value of -1 will disable this check.
  int | $curtime | The current time to check against.
  int | $ttl | Number of seconds the data can live, set to null to disable TTL.

Returns
  bool

Implements eZClusterFileHandlerInterface.

Definition at line 457 of file ezfsfilehandler.php.

References file_exists(), and isFileExpired().

Referenced by processCache().

## ◆ isFileExpired()

static eZFSFileHandler::isFileExpired | ( |  | $fname,
|  |  | $mtime,
|  |  | $expiry,
|  |  | $curtime,
|  |  | $ttl
| ) |  |
| static

Calculates if the file data is expired or not.

Parameters

  string | $fname | Name of file, available for easy debugging.
  int | $mtime | Modification time of file, can be set to false if file does not exist.
  int | $expiry | Time when file is to be expired, a value of -1 will disable this check.
  int | $curtime | The current time to check against.
  int | $ttl | Number of seconds the data can live, set to null to disable TTL.

Returns
  bool

Implements eZClusterFileHandlerInterface.

Definition at line 427 of file ezfsfilehandler.php.

References $ret.

Referenced by isDBFileExpired(), isExpired(), and isLocalFileExpired().

## ◆ isLocalFileExpired()

eZFSFileHandler::isLocalFileExpired | ( |  | $expiry,
|  |  | $curtime,
|  |  | $ttl
| ) |  |

Calculates if the local file is expired or not.

Parameters

  int | $expiry | Time when file is to be expired, a value of -1 will disable this check.
  int | $curtime | The current time to check against.
  int | $ttl | Number of seconds the data can live, set to null to disable TTL.

Returns
  bool

Implements eZClusterFileHandlerInterface.

Definition at line 1018 of file ezfsfilehandler.php.

References isFileExpired().

## ◆ loadMetaData()

eZFSFileHandler::loadMetaData | ( |  | $force = `false` | ) |

Load file meta information.

Parameters

  $force | If true, file stats will be refreshed

Implements eZClusterFileHandlerInterface.

Definition at line 110 of file ezfsfilehandler.php.

References eZDebug\accumulatorStart(), eZDebug\accumulatorStop(), file_exists(), stat(), and eZDebugSetting\writeDebug().

Referenced by __construct(), and delete().

## ◆ move()

eZFSFileHandler::move | ( |  | $dstPath | ) |

Move file.

Implements eZClusterFileHandlerInterface.

Definition at line 923 of file ezfsfilehandler.php.

References $filePath, eZDebug\accumulatorStart(), eZDebug\accumulatorStop(), eZFileHandler\move(), and eZDebugSetting\writeDebug().

## ◆ mtime()

eZFSFileHandler::mtime | ( |  | ) |

Returns file modification time.

Implements eZClusterFileHandlerInterface.

Definition at line 597 of file ezfsfilehandler.php.

References eZDebugSetting\writeDebug().

## ◆ name()

eZFSFileHandler::name | ( |  | ) |

Returns file name.

Implements eZClusterFileHandlerInterface.

Definition at line 609 of file ezfsfilehandler.php.

References $filePath, and eZDebugSetting\writeDebug().

## ◆ passthrough()

eZFSFileHandler::passthrough | ( |  | $offset = `0`,
|  |  | $length = `false`
| ) |  |

Outputs file contents to the browser Note: does not handle headers. eZFile::downloadHeaders() can be used for this

Parameters

  int | $offset | Transfer start offset
  int | $length | Transfer length, in bytes

Definition at line 863 of file ezfsfilehandler.php.

References $offset, eZDebug\accumulatorStart(), eZDebug\accumulatorStop(), eZFile\downloadContent(), and eZDebugSetting\writeDebug().

## ◆ processCache()

eZFSFileHandler::processCache | ( |  | $retrieveCallback,
|  |  | $generateCallback = `null`,
|  |  | $ttl = `null`,
|  |  | $expiry = `null`,
|  |  | $extraData = `null`
| ) |  |

Creates a single transaction out of the typical file operations for accessing caches. Caches are normally ready from the database or local file, if the entry does not exist or is expired then it generates the new cache data and stores it. This method takes care of these operations and handles the custom code by performing callbacks when needed.

The $retrieveCallback is used when the file contents can be used (ie. not re-generation) and is called when the file is ready locally. The function will be called with the file path as the first parameter, the mtime as the second and optionally $extraData as the third. The function must return the file contents or an instance of eZClusterFileFailure which can be used to tell the system that the retrieve data cannot be used after all. $retrieveCallback can be set to null which makes the system go directly to the generation.

The $generateCallback is used when the file content is expired or does not exist, in this case the content must be re-generated and stored. The function will be called with the file path as the first parameter and optionally $extraData as the second. The function must return an array with information on the contents, the array consists of:

- scope - The current scope of the file, is optional.
- datatype - The current datatype of the file, is optional.
- content - The file content, this can be any type except null.
- binarydata - The binary data which is written to the file.
- store - Whether content or binarydata should be stored to the file, if false it will simply return the data. Optional, by default it is true. Note: Set $generateCallback to false to disable generation callback. Note: Set $generateCallback to null to tell the function to perform a write lock but not do any generation, the generation must done be done by the caller by calling storeCache().

Either content or binarydata must be supplied, if not an error is issued and it returns null. If content is set it will be used as the return value of this function, if not it will return the binary data. If binarydata is set it will be used as the binary data for the file, if not it will perform a var_export on content and use that as the binary data.

For convenience the $generateCallback function can return a string which will be considered as the binary data for the file and returned as the content.

For controlling how long a cache entry can be used the parameters $expiry and $ttl is used. $expiry can be set to a timestamp which controls the absolute max time for the cache, after this time/date the cache will never be used. If the value is set to a negative value or null there the expiration check is disabled.

$ttl (time to live) tells how many seconds the cache can live from the time it was stored. If the value is set to negative or null there is no limit for the lifetime of the cache. A value of 0 means that the cache will always expire and practically disables caching. For the cache to be used both the $expiry and $ttl check must hold.

Implements eZClusterFileHandlerInterface.

Definition at line 299 of file ezfsfilehandler.php.

References $args, $filePath, $message, _exclusiveLock(), _freeExclusiveLock(), file_exists(), isExpired(), storeCache(), eZDebugSetting\writeDebug(), and eZDebug\writeError().

Referenced by processFile().

## ◆ processFile()

eZFSFileHandler::processFile | ( |  | $callback,
|  |  | $expiry = `false`,
|  |  | $extraData = `null`
| ) |  |

Provides access to the file contents by downloading the file locally and calling $callback with the local filename. The callback can then process the contents and return the data in the same way as in processCache(). Downloading is only done once so the local copy is kept, while updates to the remote DB entry is synced with the local one.

The parameters $expiry and $extraData is the same as for processCache().

Note
  Unlike processCache() this returns null if the file cannot be accessed.

Implements eZClusterFileHandlerInterface.

Definition at line 547 of file ezfsfilehandler.php.

References $result, and processCache().

## ◆ purge()

eZFSFileHandler::purge | ( |  | $printCallback = `false`,
|  |  | $microsleep = `false`,
|  |  | $max = `false`,
|  |  | $expiry = `false`
| ) |  |

Purge local and remote file data for current file.

Implements eZClusterFileHandlerInterface.

Definition at line 769 of file ezfsfilehandler.php.

References $count, $file, $filePath, and eZClusterFileHandler\cleanupEmptyDirectories().

## ◆ requiresClusterizing()

eZFSFileHandler::requiresClusterizing | ( |  | ) |

eZFS only stores data to FS and doesn't require/support clusterizing

Returns
  bool false

Implements eZClusterFileHandlerInterface.

Definition at line 986 of file ezfsfilehandler.php.

## ◆ requiresPurge()

eZFSFileHandler::requiresPurge | ( |  | ) |

eZFS does not require binary purge. Files are stored on plain FS and removed using FS functions

Since
  4.5.0

Returns
  bool

Implements eZClusterFileHandlerInterface.

Definition at line 998 of file ezfsfilehandler.php.

## ◆ size()

eZFSFileHandler::size | ( |  | ) |

Returns file size.

Implements eZClusterFileHandlerInterface.

Definition at line 573 of file ezfsfilehandler.php.

References $size, and eZDebugSetting\writeDebug().

## ◆ startCacheGeneration()

eZFSFileHandler::startCacheGeneration | ( |  | ) |

Starts cache generation for the current file.

This is done by creating a file named by the original file name, prefixed with '.generating'.

Todo:
  add timeout handling...

Returns
  mixed true if generation lock was granted, an integer matching the time before the current generation times out

Implements eZClusterFileHandlerInterface.

Definition at line 945 of file ezfsfilehandler.php.

## ◆ stat()

eZFSFileHandler::stat | ( |  | ) |

Returns file metadata.

Implements eZClusterFileHandlerInterface.

Definition at line 562 of file ezfsfilehandler.php.

References $metaData, and eZDebugSetting\writeDebug().

Referenced by loadMetaData().

## ◆ storeCache()

eZFSFileHandler::storeCache | ( |  | $fileData,
|  |  | $storeCache = `true`
| ) |  |
| private

Stores the data in $fileData to the remote and local file and commits the transaction.

The parameter $fileData must contain the same as information as the $generateCallback returns as explained in processCache().

Note
  This method is just a continuation of the code in processCache() and is not meant to be called alone since it relies on specific state in the database.

Definition at line 475 of file ezfsfilehandler.php.

References $filePath, $result, _freeExclusiveLock(), abortCacheGeneration(), storeContents(), and eZDebug\writeError().

Referenced by processCache().

## ◆ storeContents()

eZFSFileHandler::storeContents | ( |  | $contents,
|  |  | $scope = `false`,
|  |  | $datatype = `false`,
|  |  | $storeLocally = `false`
| ) |  |

Store file contents to disk

Parameters

  string | $contents | Binary file data
  string | $datatype | Not used in the FS handler
  string | $scope | Not used in the FS handler
  bool | $storeLocally | Not used in the FS handler

Returns
  void

Implements eZClusterFileHandlerInterface.

Definition at line 205 of file ezfsfilehandler.php.

References $contents, $filePath, eZDebug\accumulatorStart(), eZDebug\accumulatorStop(), eZFile\create(), and eZDebugSetting\writeDebug().

Referenced by storeCache().

## Member Data Documentation

## ◆ $filePath

eZFSFileHandler::$filePath

Definition at line 1032 of file ezfsfilehandler.php.

Referenced by __construct(), applyServerUri(), delete(), deleteLocal(), exists(), fetch(), fetchContents(), fetchUnique(), fileFetch(), fileFetchContents(), fileStoreContents(), move(), name(), processCache(), purge(), storeCache(), and storeContents().

## ◆ $lifetime

eZFSFileHandler::$lifetime

Definition at line 1034 of file ezfsfilehandler.php.

## ◆ $metaData

eZFSFileHandler::$metaData = null

Definition at line 1031 of file ezfsfilehandler.php.

Referenced by stat().

## ◆ $Mutex

eZFSFileHandler::$Mutex

Definition at line 1033 of file ezfsfilehandler.php.

Referenced by _mutex().

## ◆ EXPIRY_TIMESTAMP

const eZFSFileHandler::EXPIRY_TIMESTAMP = 233366400

Definition at line 14 of file ezfsfilehandler.php.

The documentation for this class was generated from the following file:

- ezfsfilehandler.php

Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.