承接 intellex/filesystem 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

intellex/filesystem

最新稳定版本:v1.2.2

Composer 安装命令:

composer require intellex/filesystem

包简介

README 文档

README

  • Full abstraction layer.
  • Supports both files and directories.
  • Easily read, write and search for files and directories.
  • All issues are cast to separate exceptions for simple handling.

Examples

Initialize
<?php
	$file = new File('echo.txt');
	$dir = new Dir('bucket');
Basic operations works for both files and directories
<?php
	$file->exists();
	$file->isReadable();
	$file->isWritable();
	$file->touch();
	$file->delete();
	
	$path = $file->getPath();
	$path = "{$file}";
File read and write
<?php
	$content = $file->read();
	$file->write('overwrite content');
	$file->write('append to existing content', true);
Move a file to a directory, another file or a string path
<?php
	$file->moveTo($dir);
	$file->moveTo(new File('rename.txt'));
	$file->moveTo('rename.txt');
Copy a file to a directory, another file or a string path
<?php
	$file->copyTo($dir);
	$file->copyTo(new File('file-copy.txt'));
	$file->copyTo('file-copy.txt');
List directory content, with glob patterns
<?php
	$dir->listDirectory();
	$dir->listDirectory('*.txt');
Recursively find in directory, with glob patterns
<?php
	$dir->find('*.xml');

Testing

Go to the 'tests' directory and run:

./run-tests

If there are no errors, the script will silent exit with code 0.

On any error, the error will be printed out and script will end with non-zero exit code.

To do

  1. Move and copy for directories

Licence

MIT License

Copyright (c) 2019 Intellex

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Credits

Script has been written by the Intellex team.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-04-13

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固