A Gitlab Storage filesystem for Flysystem.
This package contains a Flysystem adapter for Gitlab. Under the hood, Gitlab's Repository (files) API v4 is used.
composer require royvoetman/flysystem-gitlab-storage// Create a Gitlab Client to talk with the API $client = new Client('personal-access-token', 'project-id', 'branch', 'base-url'); // Create the Adapter that implentents Flysystems AdapterInterface $adapter = new GitlabAdapter($client)); // Create FileSystem $filesystem = new Filesystem($adapter); // write a file $filesystem->write('path/to/file.txt', 'contents'); // update a file $filesystem->update('path/to/file.txt', 'new contents'); // read a file $contents = $filesystem->read('path/to/file.txt'); // check if a file exists $exists = $filesystem->has('path/to/file.txt'); // delete a file $filesystem->delete('path/to/file.txt'); // rename a file $filesystem->rename('filename.txt', 'newname.txt'); // copy a file $filesystem->copy('filename.txt', 'duplicate.txt'); // delete a directory $filesystem->deleteDir('path/to/directory'); // see http://flysystem.thephpleague.com/api/ for full list of available functionalityGitlab supports server side API authentication with Personal Access tokens
For more information on how to create your own Personal Access token: Gitlab Docs
Every project in Gitlab has its own Project ID. It can be found at to top of the frontpage of your repository. See
This will be the URL where you host your gitlab server (e.g. https://gitlab.com)
Please see CHANGELOG for more information what has changed recently.
The MIT License (MIT). Please see License File for more information.