Codeception / Codeception/module-filesystem
Replace Filesystem, FTP with FlySystem in order to support more filesystems
- 主要語言
- PHP
- 星號
- 20
- 分支
- 7
- PR 合併指標
- 30 天內沒有已合併 PR
描述
"[FlySystem](http://flysystem.thephpleague.com/) is a filesystem abstraction which allows you to easily swap out a local filesystem for a remote one. Reducing technical debt and chance of vendor lock-in."
It could replace the custom FileSystem and FTP modules and offer support for many more filesystems. Here is a list of what's available today :
- Local
- Azure
- AWS S3 V2
- AWS S3 V3
- Copy.com
- Dropbox
- FTP / SFTP
- GridFS
- Memory
- Rackspace
- WebDAV
- PHPCR
- ZipArchive
### The API
http://flysystem.thephpleague.com/api/
#### Write Files
`$filesystem->write('path/to/file.txt', 'contents');`
#### Update Files
`$filesystem->update('path/to/file.txt', 'new contents');`
#### Write or Update Files
`$filesystem->put('path/to/file.txt', 'contents');`
#### Read Files
`$contents = $filesystem->read('path/to/file.txt');`
#### Check if a file exists
`$exists = $filesystem->has('path/to/file.txt');`
#### Delete Files
`$filesystem->delete('path/to/file.txt');`
#### Read and Delete
`$contents = $filesystem->readAndDelete('path/to/file.txt');`
#### Rename Files
`$filesystem->rename('filename.txt', 'newname.txt');`
#### Copy Files
`$filesystem->copy('filename.txt', 'duplicate.txt');`
#### Get Mimetypes
`$mimetype = $filesystem->getMimetype('path/to/file.txt');`
#### Get Timestamps
`$timestamp = $filesystem->getTimestamp('path/to/file.txt');`
#### Get File Sizes
`$size = $filesystem->getSize('path/to/file.txt');`
#### Create Directories
`$filesystem->createDir('path/to/nested/directory');`
#### Directories are also made implicitly when writing to a deeper path
`$filesystem->write('path/to/file.txt', 'contents');`
#### Delete Directories
`$filesystem->deleteDir('path/to/directory');`
貢獻指南
這個儲存庫沒有索引到貢獻指南
研究方向
先找出 issue 中提到的自訂 FileSystem 與 FTP 模組,然後將它們的 API 與描述中連結的 FlySystem API 進行比較。在決定移轉範圍之前,整理現有模組的行為與支援的操作;當替換實作支援所需的操作、不會遺失目前的功能,且模組測試通過時,即視為完成。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- php
- 領域
- operating-systems, tooling
- Issue 類型
- 功能
- 難度
- 5/5
- 預估耗時
- 一週以上
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 25/100