Skip to content

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

License

Notifications You must be signed in to change notification settings

biigle/flysystem-elements

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Flysystem ELEMENTS

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.