ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
League\Flysystem\Adapter\AbstractAdapter Class Reference
+ Inheritance diagram for League\Flysystem\Adapter\AbstractAdapter:
+ Collaboration diagram for League\Flysystem\Adapter\AbstractAdapter:

Public Member Functions

 setPathPrefix ($prefix)
 Set the path prefix. More...
 
 getPathPrefix ()
 Get the path prefix. More...
 
 applyPathPrefix ($path)
 Prefix a path. More...
 
 removePathPrefix ($path)
 Remove a path prefix. More...
 
- Public Member Functions inherited from League\Flysystem\AdapterInterface
 write ($path, $contents, Config $config)
 Write a new file. More...
 
 writeStream ($path, $resource, Config $config)
 Write a new file using a stream. More...
 
 update ($path, $contents, Config $config)
 Update a file. More...
 
 updateStream ($path, $resource, Config $config)
 Update a file using a stream. More...
 
 rename ($path, $newpath)
 Rename a file. More...
 
 copy ($path, $newpath)
 Copy a file. More...
 
 delete ($path)
 Delete a file. More...
 
 deleteDir ($dirname)
 Delete a directory. More...
 
 createDir ($dirname, Config $config)
 Create a directory. More...
 
 setVisibility ($path, $visibility)
 Set the visibility for a file. More...
 
- Public Member Functions inherited from League\Flysystem\ReadInterface
 has ($path)
 Check whether a file exists. More...
 
 read ($path)
 Read a file. More...
 
 readStream ($path)
 Read a file as a stream. More...
 
 listContents ($directory='', $recursive=false)
 List contents of a directory. More...
 
 getMetadata ($path)
 Get all the meta data of a file or directory. More...
 
 getSize ($path)
 Get the size of a file. More...
 
 getMimetype ($path)
 Get the mimetype of a file. More...
 
 getTimestamp ($path)
 Get the timestamp of a file. More...
 
 getVisibility ($path)
 Get the visibility of a file. More...
 

Protected Attributes

 $pathPrefix
 
 $pathSeparator = '/'
 

Additional Inherited Members

- Data Fields inherited from League\Flysystem\AdapterInterface
const VISIBILITY_PUBLIC = 'public'
 VISIBILITY_PUBLIC public visibility More...
 
const VISIBILITY_PRIVATE = 'private'
 VISIBILITY_PRIVATE private visibility More...
 

Detailed Description

Definition at line 7 of file AbstractAdapter.php.

Member Function Documentation

◆ applyPathPrefix()

◆ getPathPrefix()

League\Flysystem\Adapter\AbstractAdapter::getPathPrefix ( )

Get the path prefix.

Returns
string path prefix

Definition at line 43 of file AbstractAdapter.php.

References League\Flysystem\Adapter\AbstractAdapter\$pathPrefix.

Referenced by League\Flysystem\Adapter\AbstractAdapter\applyPathPrefix(), and League\Flysystem\Adapter\AbstractAdapter\removePathPrefix().

+ Here is the caller graph for this function:

◆ removePathPrefix()

League\Flysystem\Adapter\AbstractAdapter::removePathPrefix (   $path)

Remove a path prefix.

Parameters
string$path
Returns
string path without the prefix

Definition at line 67 of file AbstractAdapter.php.

References $path, and League\Flysystem\Adapter\AbstractAdapter\getPathPrefix().

Referenced by League\Flysystem\Adapter\Local\getFilePath().

68  {
69  return substr($path, strlen($this->getPathPrefix()));
70  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setPathPrefix()

League\Flysystem\Adapter\AbstractAdapter::setPathPrefix (   $prefix)

Set the path prefix.

Parameters
string$prefix
Returns
void

Definition at line 26 of file AbstractAdapter.php.

References League\Flysystem\Adapter\AbstractAdapter\$pathSeparator, and string.

Referenced by League\Flysystem\Adapter\Local\__construct(), and ILIAS\Filesystem\Provider\FlySystem\FlySystemLocalFilesystemFactory\getInstance().

27  {
28  $prefix = (string) $prefix;
29 
30  if ($prefix === '') {
31  $this->pathPrefix = null;
32  return;
33  }
34 
35  $this->pathPrefix = rtrim($prefix, '\\/') . $this->pathSeparator;
36  }
Add rich text string
+ Here is the caller graph for this function:

Field Documentation

◆ $pathPrefix

League\Flysystem\Adapter\AbstractAdapter::$pathPrefix
protected

◆ $pathSeparator

League\Flysystem\Adapter\AbstractAdapter::$pathSeparator = '/'
protected

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