Elgg  Version 6.2
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 \ElggFile object. More...
 
 getParameters ()
 {Returns a list of attributes to save to the database when saving the \ElggFile object using this file store.
Returns
array
} More...
 
 setParameters (array $parameters)
 {Sets parameters that should be saved to database.
Parameters
array$parametersSet parameters to save to DB for this filestore.
Returns
bool
} More...
 
- Public Member Functions inherited from Elgg\Filesystem\Filestore\DiskFilestore
 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 \ElggFile 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 \ElggFile file. More...
 
 grabFile (\ElggFile $file)
 Returns the contents of the \ElggFile file. More...
 
 exists (\ElggFile $file)
 Tests if an \ElggFile file exists. More...
 
- Public Member Functions inherited from Elgg\Filesystem\Filestore
 write ($f, string $data)
 Write data to a given file handle. 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.
Since
3.0

Definition at line 15 of file TempDiskFilestore.php.

Constructor & Destructor Documentation

◆ __construct()

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 "/"

Reimplemented from Elgg\Filesystem\Filestore\DiskFilestore.

Definition at line 27 of file TempDiskFilestore.php.

Member Function Documentation

◆ getFilenameOnFilestore()

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

Get the filename as saved on disk for an \ElggFile object.

Returns an empty string if no filename set

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

Reimplemented from Elgg\Filesystem\Filestore\DiskFilestore.

Definition at line 47 of file TempDiskFilestore.php.

◆ getParameters()

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

{Returns a list of attributes to save to the database when saving the \ElggFile object using this file store.

Returns
array
}

Reimplemented from Elgg\Filesystem\Filestore\DiskFilestore.

Definition at line 59 of file TempDiskFilestore.php.

◆ setParameters()

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

{Sets parameters that should be saved to database.

Parameters
array$parametersSet parameters to save to DB for this filestore.
Returns
bool
}

Reimplemented from Elgg\Filesystem\Filestore\DiskFilestore.

Definition at line 69 of file TempDiskFilestore.php.

Member Data Documentation

◆ $unique_sub_dir

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: