Elgg  Version 2.3
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
Elgg\Filesystem\Directory\Fly Class Reference

A wrapper around Flysystem that implements Elgg's filesystem API. More...

Inheritance diagram for Elgg\Filesystem\Directory\Fly:
Elgg\Filesystem\Directory

Public Member Functions

 __construct (Filesystem $filesystem, $local_path= '', $chroot= '')
 Use one of the static factory functions to create an instance. More...
 
 chroot ($path)
 
 isFile ($path)
 
 getContents ($path)
 
 getFile ($path)
 
 getFiles ($path= '', $recursive=true)
 
 getDirectories ($path= '', $recursive=true)
 
 getPath ($path= '')
 
 includeFile ($path)
 
 putContents ($path, $content)
 

Static Public Member Functions

static createLocal ($path)
 Shorthand for generating a new local filesystem. More...
 
static createInMemory ()
 Shorthand for generating a new in-memory-only filesystem. More...
 

Protected Member Functions

 getEntries ($path= '', $recursive=true, $types=['file', 'dir'])
 List the files and directories in the given directory path. More...
 

Detailed Description

A wrapper around Flysystem that implements Elgg's filesystem API.

Since
1.10.0

private

Definition at line 18 of file Fly.php.

Constructor & Destructor Documentation

Elgg\Filesystem\Directory\Fly::__construct ( Filesystem  $filesystem,
  $local_path = '',
  $chroot = '' 
)

Use one of the static factory functions to create an instance.

Parameters
Filesystem$filesystemThe underlying filesystem implementation. It must have the 'ListFiles' plugin.
string$local_pathOnly applicable for local filesystem.
string$chrootPath relative to the underlying filesystem root.

Definition at line 36 of file Fly.php.

Member Function Documentation

Elgg\Filesystem\Directory\Fly::chroot (   $path)

Implements Elgg\Filesystem\Directory.

Definition at line 43 of file Fly.php.

static Elgg\Filesystem\Directory\Fly::createInMemory ( )
static

Shorthand for generating a new in-memory-only filesystem.

Returns
Directory

Definition at line 166 of file Fly.php.

static Elgg\Filesystem\Directory\Fly::createLocal (   $path)
static

Shorthand for generating a new local filesystem.

Parameters
string$pathabsolute path to directory on local filesystem.
Returns
Directory

Definition at line 156 of file Fly.php.

Elgg\Filesystem\Directory\Fly::getContents (   $path)

Implements Elgg\Filesystem\Directory.

Definition at line 66 of file Fly.php.

Elgg\Filesystem\Directory\Fly::getDirectories (   $path = '',
  $recursive = true 
)

Implements Elgg\Filesystem\Directory.

Definition at line 85 of file Fly.php.

Elgg\Filesystem\Directory\Fly::getEntries (   $path = '',
  $recursive = true,
  $types = ['file',
'dir']   
)
protected

List the files and directories in the given directory path.

Parameters
string$pathThe subdirectory path within this directory
bool$recursiveFind files and directories recursively
string[]$types Entry types to return ('file' and/or 'dir')
Returns
Collection<File|Directory>
Exceptions

Definition at line 100 of file Fly.php.

Elgg\Filesystem\Directory\Fly::getFile (   $path)

Implements Elgg\Filesystem\Directory.

Definition at line 71 of file Fly.php.

Elgg\Filesystem\Directory\Fly::getFiles (   $path = '',
  $recursive = true 
)

Implements Elgg\Filesystem\Directory.

Definition at line 80 of file Fly.php.

Elgg\Filesystem\Directory\Fly::getPath (   $path = '')

Implements Elgg\Filesystem\Directory.

Definition at line 120 of file Fly.php.

Elgg\Filesystem\Directory\Fly::includeFile (   $path)

Implements Elgg\Filesystem\Directory.

Definition at line 140 of file Fly.php.

Elgg\Filesystem\Directory\Fly::isFile (   $path)

Implements Elgg\Filesystem\Directory.

Definition at line 60 of file Fly.php.

Elgg\Filesystem\Directory\Fly::putContents (   $path,
  $content 
)

Implements Elgg\Filesystem\Directory.

Definition at line 145 of file Fly.php.


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