atomicptr/flysystem-github-storage

基于 GitHub 的 Flysystem 文件系统。

v0.1.4 2024-09-19 15:47 UTC

This package is auto-updated.

Last update: 2024-09-19 15:50:00 UTC


README

这是一个基于 GitHub 的 Flysystem 文件系统,由 php-github-api 支持。

注意:请记住 GitHub 有请求限制,所以如果您需要进行大量文件操作,可能需要其他工具。

灵感来源于 @RoyVoetman/flysystem-gitlab-storage

用法

<?php

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", "peter@developer.tld"),
);

$filesystem = new Filesystem($adapter);

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

Laravel

查看我的其他仓库: atomicptr/laravel-github-storage

许可证

MIT