covex-nn/joos-stream
JooS_Stream provides a PHP stream wrapper for a virtual filesystem protocol mapped to a base directory. Register a custom scheme, then use standard functions like file_put_contents, unlink, and file_exists on scheme:// paths; unregister when done.
<?php
JooS\Stream\Wrapper_FS::register("any-vfs-protocol", __DIR__);
file_put_contents("any-vfs-protocol://" . basename(__FILE__), "hahaha");
unlink("any-vfs-protocol://" . basename(__FILE__));
// JooS\Stream\Wrapper_FS::commit("any-vfs-protocol");
// echo file_exists(__FILE__) ? "yes" : "no";
JooS\Stream\Wrapper_FS::unregister("any-vfs-protocol");
?>
Please visit wiki.
How can I help you explore Laravel packages today?