biigle/flysystem-elements

Flysystem adapter for the ELEMENTS media asset management system (read-only).

v2.5 2024-12-13 15:23 UTC

This package is auto-updated.

Last update: 2024-12-13 15:23:47 UTC


README

Tests

Flysystem adapter for the ELEMENTS media asset management system (read-only).

Installation

composer require biigle/flysystem-elements

Usage

use Biigle\Flysystem\Elements\ElementsAdapter;
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://elements.example.com',
    'headers' => [
        'Authorization' => 'Bearer my-elements-api-token',
    ],
]);
$adapter = new ElementsAdapter($client);

$exists = $adapter->fileExists('.projects/path/to/file.jpg');
var_dump($exists);
// bool(true);

Supported methods are:

  • fileExists
  • directoryExists
  • read
  • readStream
  • visibility
  • mimeType
  • lastModified
  • fileSize
  • listContents

All other (non-reading) methods throw an exception.