Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

Public Member Functions | List of all members
eZDFSFileHandlerDFSBackendInterface Interface Reference
Inheritance diagram for eZDFSFileHandlerDFSBackendInterface:

## Public Member Functions
| copyFromDFSToDFS ( $srcFilePath, $dstFilePath)
| copyFromDFS ( $srcFilePath, $dstFilePath=false)
| copyToDFS ( $srcFilePath, $dstFilePath=false)
| delete ( $filePath)
| passthrough ( $filePath, $startOffset=0, $length=false)
| getContents ( $filePath)
| createFileOnDFS ( $filePath, $contents)
| renameOnDFS ( $oldPath, $newPath)
| existsOnDFS ( $filePath)
| getDfsFileSize ( $filePath)
| getFilesList ( $basePath)
| applyServerUri ( $filePath)

## Detailed Description

This file is part of the Exponential Legacy package.

Copyright
  Copyright (C) eZ Systems AS. All rights reserved. @license For full copyright and license information view LICENSE file distributed with this source code.

Version
  //autogentag// Interface for a DFS FS handler, that offers CRUD support for binary files.

Implementations of this interface can be used by DFS database backends, such as eZDFSFileHandlerMySQLiBackend, to read/write to a binary file storage medium.

Definition at line 17 of file ezdfsfilehandlerdfsbackendinterface.php.

## Member Function Documentation

## ◆ applyServerUri()

eZDFSFileHandlerDFSBackendInterface::applyServerUri | ( |  | $filePath | ) |

Transforms $filePath so that it contains a valid href to the file, wherever it is stored.

Parameters

  string | $filePath | Example: /var/site/storage/images/example.png

Returns
  string http://static.example.com/var/site/storage/images/example.png

Implemented in eZDFSFileHandlerDFSBackend.

## ◆ copyFromDFS()

eZDFSFileHandlerDFSBackendInterface::copyFromDFS | ( |  | $srcFilePath,
|  |  | $dstFilePath = `false`
| ) |  |

Copies the DFS file $srcFilePath to FS

Parameters

  string | $srcFilePath | Source file path (on DFS)
  string | $dstFilePath | Destination file path (on FS). If not specified, $srcFilePath is used

Returns
  bool

Implemented in eZDFSFileHandlerDFSBackend.

## ◆ copyFromDFSToDFS()

eZDFSFileHandlerDFSBackendInterface::copyFromDFSToDFS | ( |  | $srcFilePath,
|  |  | $dstFilePath
| ) |  |

Creates a copy of $srcFilePath from DFS to $dstFilePath on DFS

Parameters

  string | $srcFilePath | Local source file path
  string | $dstFilePath | Local destination file path

Returns
  bool

Implemented in eZDFSFileHandlerDFSBackend.

## ◆ copyToDFS()

eZDFSFileHandlerDFSBackendInterface::copyToDFS | ( |  | $srcFilePath,
|  |  | $dstFilePath = `false`
| ) |  |

Copies the local file $filePath to DFS under the same name, or a new name if specified

Parameters

  string | $srcFilePath | Local file path to copy from
  bool | string | $dstFilePath | Optional path to copy to. If not specified, $srcFilePath is used on DFS as well.

Returns
  bool

Implemented in eZDFSFileHandlerDFSBackend.

## ◆ createFileOnDFS()

eZDFSFileHandlerDFSBackendInterface::createFileOnDFS | ( |  | $filePath,
|  |  | $contents
| ) |  |

Creates $filePath with $contents

Parameters

  string | $filePath |
  string | $contents |

Returns
  bool

Implemented in eZDFSFileHandlerDFSBackend.

## ◆ delete()

eZDFSFileHandlerDFSBackendInterface::delete | ( |  | $filePath | ) |

Deletes one or more files

Parameters

  string | array | $filePath | Single local filename, or array of local filenames

Returns
  bool true if deletion was successful, false otherwise

Todo:
  Improve error handling using exceptions

Implemented in eZDFSFileHandlerDFSBackend.

## ◆ existsOnDFS()

eZDFSFileHandlerDFSBackendInterface::existsOnDFS | ( |  | $filePath | ) |

Checks if a file exists on the DFS

Parameters

  string | $filePath |

Returns
  bool

Implemented in eZDFSFileHandlerDFSBackend.

## ◆ getContents()

eZDFSFileHandlerDFSBackendInterface::getContents | ( |  | $filePath | ) |

Returns the content of $filePath

Parameters

  string | $filePath | file path

Returns
  string|bool file's content, or false

Todo:
  Handle errors using exceptions

Implemented in eZDFSFileHandlerDFSBackend.

## ◆ getDfsFileSize()

eZDFSFileHandlerDFSBackendInterface::getDfsFileSize | ( |  | $filePath | ) |

Returns the size in bytes of $filePath

Parameters

  string | $filePath |

Returns
  int

Implemented in eZDFSFileHandlerDFSBackend.

## ◆ getFilesList()

eZDFSFileHandlerDFSBackendInterface::getFilesList | ( |  | $basePath | ) |

Returns an iterator over the files within $basePath on the backend

Parameters

  string | $basePath | a path relative to the mount point

Returns
  Iterator An iterator that returns a DFS File pathname as the value

Implemented in eZDFSFileHandlerDFSBackend.

## ◆ passthrough()

eZDFSFileHandlerDFSBackendInterface::passthrough | ( |  | $filePath,
|  |  | $startOffset = `0`,
|  |  | $length = `false`
| ) |  |

Sends the contents of $filePath to default output

Parameters

  string | $filePath | File path
  int | $startOffset | Starting offset
  bool | int | $length | Length to transmit, false means everything

Returns
  bool true, or false if operation failed

Implemented in eZDFSFileHandlerDFSBackend.

## ◆ renameOnDFS()

eZDFSFileHandlerDFSBackendInterface::renameOnDFS | ( |  | $oldPath,
|  |  | $newPath
| ) |  |

Renames $oldPath to $newPath

Parameters

  string | $oldPath |
  string | $newPath |

Returns
  bool

Implemented in eZDFSFileHandlerDFSBackend.

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

- ezdfsfilehandlerdfsbackendinterface.php

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