PHP code example of atomicptr / flysystem-github-storage

1. Go to this page and download the library: Download atomicptr/flysystem-github-storage library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

atomicptr / flysystem-github-storage example snippets




use Atomicptr\FlysystemGithub\GithubAdapter;
use Atomicptr\FlysystemGithub\Credentials;
use Atomicptr\FlysystemGithub\Committer;
use League\Flysystem\Filesystem;

$adapter = new GithubAdapter(
    "username",
    "repository",
    branch: "master",
    credentials: Credentials::fromToken("token..."),
    committer: new Committer("Peter Developer", "[email protected]"),
);

$filesystem = new Filesystem($adapter);

// see http://flysystem.thephpleague.com/api/ for full list of available functionality