2017 © Pedro Peláez
 

library virtfs

Virtual filesystems (like physfs) - with autoloading!

image

noccylabs/virtfs

Virtual filesystems (like physfs) - with autoloading!

  • Wednesday, July 30, 2014
  • by noccy80
  • Repository
  • 1 Watchers
  • 1 Stars
  • 3 Installations
  • PHP
  • 1 Dependents
  • 1 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

VirtFs is to PHP what PhysFs is to C. It allows you to create a virtual filesystem root, to then attach directories and archives to it, optionally mounted in their own virtual path in the vfs. In addition to this, VirtFs also registers a StreamWrapper to give you access to the VFS via a stream prefix, such as "userdata://.."., (*1)

$vfs = new VirtFs("dirs");
$vfs->add(new DirectoryMounter("./dir_a", "a"));
$vfs->add(new DirectoryMounter("./dir_b", "b"));

What we have now is:, (*2)

      /      The filesystem root
      |--a   The contents of ./dir_a
      '--b   The contents of ./dir_b

In the above example, these would be valid:, (*3)

dirs://a/hello.txt      -  ./dir_a/hello.txt
dirs://b/foo            -  ./dir_b/foo

Plugin behavior

To load plugins from individual .zip-archives, or directly from one or more plugin directories, see examples/autoloading/. These examples also demonstrates the autoloader, (*4)

Autoloader

To be able to autoload classes from a VirtFs filesystem, use the VirtFsLoader class:, (*5)

use NoccyLabs\VirtFs\VirtFsLoader;

$loader = new VirtFsLoader($virtfs);
$loader->register

The Versions

30/07 2014

dev-master

9999999-dev

Virtual filesystems (like physfs) - with autoloading!

  Sources   Download

GPL-3.0

The Requires

  • php >=2.4
  • noccylabs/filesysteminterface 0.1.*

 

by Christopher Vagnetoft

autoload physfs virtual filesystem

30/07 2014

0.1.1.1

0.1.1.1

Virtual filesystems (like physfs) - with autoloading!

  Sources   Download

GPL-3.0

The Requires

  • php >=2.4
  • noccylabs/filesysteminterface 0.1.*

 

by Christopher Vagnetoft

autoload physfs virtual filesystem

24/07 2014

0.1.1

0.1.1.0

Virtual filesystems (like physfs) - with autoloading!

  Sources   Download

GPL-3.0

The Requires

  • php >=2.4
  • noccylabs/filesysteminterface 0.1.*

 

by Christopher Vagnetoft

autoload physfs virtual filesystem

10/07 2014

0.1.0

0.1.0.0

Virtual filesystems (like physfs) - with autoloading!

  Sources   Download

GPL-3.0

by Christopher Vagnetoft

autoload physfs virtual filesystem