orisai/vfs

使用纯PHP模拟文件系统

v1.x-dev 2024-06-21 10:43 UTC

This package is auto-updated.

Last update: 2024-09-21 11:22:56 UTC


README

Orisai
虚拟文件系统

使用纯PHP模拟文件系统

📄 查看我们的 文档

💸 如果您喜欢 Orisai,请 捐款。感谢您!

此包是来自 michael-donatphp-vfs 的重制。感谢您,Michael!

use Orisai\VFS\VFS;

// Register VFS protocol
$scheme = VFS::register();

// Write into virtual file
file_put_contents("$scheme://file", 'content');

// Read content of virtual file
$content = file_get_contents("$scheme://file");

// Unregister protocol, delete the virtual filesystem
VFS::unregister($scheme);