sun/filesystem
最新稳定版本:v1.3
Composer 安装命令:
composer require sun/filesystem
包简介
This package helps you to manage your file easily.
README 文档
README
Filesystem helps you to manage your file easily.
Installation Process
Just copy Filesystem folder somewhere into your project directory. Then include filesystem autoloader.
require_once('/path/to/Filesystem/autoload.php');
Filesystem is also available via Composer/Packagist.
composer require sun/filesystem
All Methods
To create file
$filesystem = new Sun\Filesystem; $filesystem->create(__DIR__.'/filename.txt', 'content');
To delete file
$filesystem->delete(__DIR__.'/filename.txt');
To update file
$filesystem->update(__DIR__.'/filename.txt', ' more content');
To get file content
$filesystem->get(__DIR__.'/filename.txt');
To append file content
$filesystem->append(__DIR__.'/filename.txt', 'more content');
To copy a file
$filesystem->copy(__DIR__.'/filename.txt', __DIR__.'/filename2.txt' );
To move a file
$filesystem->move(__DIR__.'/filename.txt', __DIR__.'/destination/filename.txt' );
To get filesize
$filesystem->size(__DIR__.'/filename.txt');
To check file exists
$filesystem->exists(__DIR__.'/filename.txt');
To get all files in a directory
$filesystem->files(__DIR__.'/directoryName');
To get all directories in a directory
$filesystem->directories(__DIR__.'/directoryName');
To create a directory
$filesystem->createDirectory(__DIR__.'/directoryName');
To delete a directory
$filesystem->deleteDirectory(__DIR__.'/directoryName');
To clean a directory
$filesystem->cleanDirectory(__DIR__.'/directoryName');
License
This package is licensed under the MIT License
统计信息
- 总下载量: 58
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-07-11