Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / vendor / mikey179 / vfsStream / src / main / php / org / bovigo / vfs / vfsStream.php
index df13d99bb410b701ead72b7e6f33efc52b68f8be..b804072b4c96633c1acd91afbce4106ec3fa6ba5 100644 (file)
@@ -9,6 +9,7 @@
  */
 namespace org\bovigo\vfs;
 use org\bovigo\vfs\content\LargeFileContent;
+use org\bovigo\vfs\content\FileContent;
 use org\bovigo\vfs\visitor\vfsStreamVisitor;
 /**
  * Some utility methods for vfsStream.
@@ -241,6 +242,10 @@ class vfsStream
                 } else {
                     self::newFile($name)->withContent($data)->at($baseDir);
                 }
+            } elseif ($data instanceof FileContent) {
+                self::newFile($name)->withContent($data)->at($baseDir);
+            } elseif ($data instanceof vfsStreamFile) {
+                $baseDir->addChild($data);
             }
         }