Download the PHP package larva/flysystem-tos without Composer

On this page you can find all versions of the php package larva/flysystem-tos. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package flysystem-tos

flysystem-tos

Stable Version Total Downloads License

这是火山引擎 TOS(Tinder Object Storage)对象存储的 Flysystem 适配器,支持 Flysystem v2/v3。

环境要求

安装

基础用法

1. 创建 TOS 客户端

2. 创建适配器

3. 配合 Filesystem 使用

可见性控制

适配器通过 VisibilityConverter 接口将 Flysystem 的可见性(public / private)映射为 TOS 的 ACL:

Flysystem 可见性 TOS ACL
Visibility::PUBLIC public-read
Visibility::PRIVATE private

默认使用 PortableVisibilityConverter,你也可以实现 VisibilityConverter 接口自定义映射逻辑:

支持的方法

方法 说明
write($path, $contents, $config) 写入文件
writeStream($path, $stream, $config) 以流的方式写入文件
read($path) 读取文件内容
readStream($path) 以流的方式读取文件
fileExists($path) 判断文件是否存在
directoryExists($path) 判断目录是否存在
delete($path) 删除文件
deleteDirectory($path) 删除目录
createDirectory($path, $config) 创建目录
setVisibility($path, $visibility) 设置文件可见性
visibility($path) 获取文件可见性
mimeType($path) 获取文件 MIME 类型
lastModified($path) 获取文件最后修改时间
fileSize($path) 获取文件大小
listContents($path, $deep) 列出目录内容
move($source, $destination, $config) 移动文件
copy($source, $destination, $config) 复制文件

Laravel 集成

在 Laravel 项目中,可以通过自定义 Filesystem 驱动的方式集成:

config/filesystems.php 中添加磁盘配置:

然后在 .env 中配置相应的环境变量:

使用方式:

获取客户端

如需直接操作 TOS SDK,可以获取底层客户端:

贡献

欢迎提交 Issue 和 Pull Request。

License

MIT


All versions of flysystem-tos with dependencies

PHP Build Version
Package Version
Requires league/flysystem Version ^2.0|^3.0
league/mime-type-detection Version ^1.0.0
volcengine/ve-tos-php-sdk Version ^2.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package larva/flysystem-tos contains the following files

Loading the files please wait ...