定制 mathsgod/flysystem-pcloud 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

mathsgod/flysystem-pcloud

最新稳定版本:1.0.0

Composer 安装命令:

composer require mathsgod/flysystem-pcloud

包简介

A Flysystem adapter for pCloud storage

README 文档

README

A Flysystem adapter for pCloud, supporting PHP 8+. Usable in Laravel, Symfony, and any PHP project.

Features

  • Upload, download, delete, copy, and move files/folders
  • Stream upload for large files
  • Recursive directory listing
  • Auto-create missing directories
  • Robust error handling

Installation

composer require mathsgod/flysystem-pcloud

Usage

use League\Flysystem\Filesystem;
use League\Flysystem\pCloud\pCloudAdapter;

$adapter = new pCloudAdapter(
    region: 'eu', // or 'us'
    accessToken: 'your-access-token'
);

$filesystem = new Filesystem($adapter);

// Upload a file
$filesystem->write('/folder/file.txt', 'content');

// Read a file
$content = $filesystem->read('/folder/file.txt');

// List directory contents
foreach ($filesystem->listContents('/folder', true) as $item) {
    echo $item->path() . PHP_EOL;
}

Parameters

  • region: 'eu' or 'us', depending on your pCloud account region
  • accessToken: Your pCloud OAuth2 access token

Notes

  • Directory operations will auto-create missing parent folders
  • pCloud API only supports some file attributes; visibility is not supported
  • Any API error will throw an Exception

License

MIT

统计信息

  • 总下载量: 0
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-06-30