tao-test/app/vendor/league/flysystem-memory
2022-08-29 20:14:13 +02:00
..
src Code, before instalation. 2022-08-29 20:14:13 +02:00
.php_cs Code, before instalation. 2022-08-29 20:14:13 +02:00
composer.json Code, before instalation. 2022-08-29 20:14:13 +02:00
LICENSE Code, before instalation. 2022-08-29 20:14:13 +02:00
README.md Code, before instalation. 2022-08-29 20:14:13 +02:00

Flysystem Memory Adapter

Author Build Status Coverage Status Quality Score Software License Packagist Version Total Downloads

This adapter keeps the filesystem in memory. It's useful when you need a filesystem, but do not need it persisted.

Installation

composer require league/flysystem-memory

Usage

use League\Flysystem\Filesystem;
use League\Flysystem\Memory\MemoryAdapter;

$filesystem = new Filesystem(new MemoryAdapter());

$filesystem->write('new_file.txt', 'yay a new text file!');

$contents = $filesystem->read('new_file.txt');

// Explicitly set timestamp (e.g. for testing)
$filesystem->write('old_file.txt', 'very old content', ['timestamp' => 13377331]);