phant/file 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

phant/file

最新稳定版本:2.4

Composer 安装命令:

composer require phant/file

包简介

Manage file easily

README 文档

README

Requirments

PHP >= 8.1

Install

composer require phant/file

Usages

File

use Phant\File\File;

$file = new File('path/filename.ext');

Get file path

$filePath = $file->getPath();

Verify if file exist file path

$fileExist = $file->exist();

Delete file

$file->delete();

Get temporary path

$temoraryDirectory = $file->getTemoraryDirectory();

Clean filename

$cleanFilename = File::cleanFilename($dirtyFilename);

Download file to temporary directory

$file = File::download($fileUrl);

Csv file

use Phant\File\Csv;

$file = new File('path/filename.csv');

Verify columns

$isConform = $file->verifyColumns($columns);

Get number of lines

$nbLines = $file->getNbLines();

Read file by line

foreach ($file->readFileByLine() as $line) {
	
}

Zip file

use Phant\File\Zip;

$file = new File('path/filename.zip');

Unarchive

$files = $file->unarchive();
foreach ($files as $file) {
}

统计信息

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

GitHub 信息

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

其他信息

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