Elgg  Version master
Public Member Functions | Protected Attributes | List of all members
Elgg\Filesystem\Filestore\TempDiskFilestore Class Reference

A filestore that uses disk as storage. More...

Inheritance diagram for Elgg\Filesystem\Filestore\TempDiskFilestore:
Elgg\Filesystem\Filestore\DiskFilestore Elgg\Filesystem\Filestore

Public Member Functions

 __construct ($directory_root= '')
 Construct a temp disk filestore using the given directory root. More...
 
 getFilenameOnFilestore (\ElggFile $file)
 Get the filename as saved on disk for an object. More...
 
 getParameters ()
 {} More...
 
 setParameters (array $parameters)
 {} More...
 
- Public Member Functions inherited from Elgg\Filesystem\Filestore\DiskFilestore
 __construct ($directory_root= '')
 Construct a disk filestore using the given directory root. More...
 
 open (\ElggFile $file, string $mode)
 Open a file for reading, writing, or both. More...
 
 write ($f, $data)
 Write data to a file. More...
 
 read ($f, int $length, int $offset=0)
 Read data from a file. More...
 
 close ($f)
 Close a file pointer. More...
 
 delete (\ElggFile $file, bool $follow_symlinks=true)
 Delete an file. More...
 
 seek ($f, int $position)
 Seek to the specified position. More...
 
 tell ($f)
 Return the current location of the internal pointer. More...
 
 eof ($f)
 Tests for end of file on a file pointer. More...
 
 getFileSize (\ElggFile $file)
 Returns the file size of an file. More...
 
 getFilenameOnFilestore (\ElggFile $file)
 Get the filename as saved on disk for an object. More...
 
 grabFile (\ElggFile $file)
 Returns the contents of the file. More...
 
 exists (\ElggFile $file)
 Tests if an file exists. More...
 
 getParameters ()
 Returns a list of attributes to save to the database when saving the object using this file store. More...
 
 setParameters (array $parameters)
 Sets parameters that should be saved to database. More...
 
- Public Member Functions inherited from Elgg\Filesystem\Filestore
 open (\ElggFile $file, string $mode)
 Attempt to open the file $file for storage or writing. More...
 
 write ($f, string $data)
 Write data to a given file handle. More...
 
 read ($f, int $length, int $offset=0)
 Read data from a filestore. More...
 
 seek ($f, int $position)
 Seek a given position within a file handle. More...
 
 eof ($f)
 Return a whether the end of a file has been reached. More...
 
 tell ($f)
 Return the current position in an open file. More...
 
 close ($f)
 Close a given file handle. More...
 
 delete (\ElggFile $file, bool $follow_symlinks=true)
 Delete the file associated with a given file handle. More...
 
 getFileSize (\ElggFile $file)
 Return the size in bytes for a given file. More...
 
 getFilenameOnFilestore (\ElggFile $file)
 Return the filename of a given file as stored on the filestore. More...
 
 getParameters ()
 Get the filestore's creation parameters as an associative array. More...
 
 setParameters (array $parameters)
 Set the parameters from the associative array produced by $this->getParameters(). More...
 
 grabFile (\ElggFile $file)
 Get the contents of the whole file. More...
 
 exists (\ElggFile $file)
 Return whether a file physically exists or not. More...
 

Protected Attributes

 $unique_sub_dir
 
- Protected Attributes inherited from Elgg\Filesystem\Filestore\DiskFilestore
 $dir_root
 

Additional Inherited Members

- Public Attributes inherited from Elgg\Filesystem\Filestore\DiskFilestore
const BUCKET_SIZE = 5000
 Number of entries per matrix dir. More...
 
- Protected Member Functions inherited from Elgg\Filesystem\Filestore\DiskFilestore
 makeDirectoryRoot ($dirroot)
 Create a directory $dirroot. More...
 

Detailed Description

A filestore that uses disk as storage.

Warning
This should be used by a wrapper class like ElggFile.@since3.0

Definition at line 15 of file TempDiskFilestore.php.

Constructor & Destructor Documentation

Elgg\Filesystem\Filestore\TempDiskFilestore::__construct (   $directory_root = '')

Construct a temp disk filestore using the given directory root.

Parameters
string$directory_rootRoot directory, must end in "/"

Definition at line 27 of file TempDiskFilestore.php.

Member Function Documentation

Elgg\Filesystem\Filestore\TempDiskFilestore::getFilenameOnFilestore ( \ElggFile  $file)

Get the filename as saved on disk for an object.

Returns an empty string if no filename set

Parameters
\ElggFile$fileFile object
Returns
string The full path of where the file is stored

Definition at line 47 of file TempDiskFilestore.php.

Elgg\Filesystem\Filestore\TempDiskFilestore::getParameters ( )

{}

Definition at line 59 of file TempDiskFilestore.php.

Elgg\Filesystem\Filestore\TempDiskFilestore::setParameters ( array  $parameters)

{}

Definition at line 69 of file TempDiskFilestore.php.

Member Data Documentation

Elgg\Filesystem\Filestore\TempDiskFilestore::$unique_sub_dir
protected

Definition at line 20 of file TempDiskFilestore.php.


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