66        if ($this->flySystemFS->has(
$path)) {
 
   67            $meta = $this->flySystemFS->getMetadata(
$path);
 
   69            if (!(is_array($meta) && array_key_exists(self::$metaTypeKey, $meta))) {
 
   70                throw new IOException(
"Could not evaluate path type: \"$path\"");
 
  101        $metadataCollection = [];
 
  104            if (!(array_key_exists(self::$metaTypeKey, $content) && array_key_exists(self::$metaPathKey, $content))) {
 
  105                throw new IOException(
"Invalid metadata received for path \"$path\"");
 
  111        return $metadataCollection;
 
  136        $config = [
'visibility' => $visibility];
 
  137        $successful = $this->flySystemFS->createDir(
$path, 
$config);
 
  140            throw new IOException(
"Could not create directory \"$path\"");
 
  171        foreach ($contentList as $content) {
 
  174            if ($content->isFile()) {
 
  177                $position = strpos($content->getPath(), 
$source);
 
  178                if ($position !== 
false) {
 
  179                    $destinationFilePath = substr_replace($content->getPath(), 
$destination, $position, strlen(
$source));
 
  180                    $this->fileAccess->copy($content->getPath(), $destinationFilePath);
 
  200            if (count($destinationContent) !== 0) {
 
  201                throw new IOException(
"Destination \"$path\" is not empty can not copy files.");
 
  240            if ($this->flySystemFS->deleteDir(
$path) === 
false) {
 
  241                throw new IOException(
"Could not delete directory \"$path\".");
 
  244            throw new IOException(
'The filesystem root must not be deleted.', 0, $ex);
 
  264            $metadataArray[self::$metaPathKey],
 
  265            $metadataArray[self::$metaTypeKey]
 
  280            throw new \InvalidArgumentException(
"Invalid visibility expected public or private but got \"$visibility\".");
 
An exception for terminatinating execution or to throw for unit testing.
Class DirectoryNotFoundException.
Class FileNotFoundException.
Class FlySystemDirectoryAccess.
ensureEmptyDirectory($path)
Ensures that the given path does not exist or is empty.
ensureDirectoryExistence($path)
Checks if the directory exists.
__construct(FilesystemInterface $flySystemFS, FlySystemFileAccess $fileAccess)
FlySystemDirectoryAccess constructor.
listContents($path='', $recursive=false)
Lists the content of a directory.
copyDir($source, $destination)
Copy all childes of the source recursive to the destination.
validateVisibility($visibility)
Validates if the given visibility is known, otherwise an exception is thrown.
createDir($path, $visibility=Visibility::PUBLIC_ACCESS)
Create a new directory.
hasDir($path)
Checks whether the directory exists or not.
deleteDir($path)
Deletes a directory recursive.
arrayToMetadata(array $metadataArray)
Parses a metadata array into a metadata object.
Class FlySystemFileAccess.
Interface DirectoryAccess.
const PRIVATE_ACCESS
Private file visibility.
const PUBLIC_ACCESS
Public file visibility.