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

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

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

phpfit/file

最新稳定版本:1.0.0

Composer 安装命令:

composer require phpfit/file

包简介

A simple library to work with local files

README 文档

README

A simple library to work with local files.

Installation

composer require phpfit/file

Usage

<?php

use PhpFit\File\FileSystem;

$dir = '/home/apps/site.com/folder/to/clean/up';
FileSystem::cleanUp($dir);

Classes

PhpFit\File\FileSystem

static cleanUp(string $path): bool

Remove all folders from $path up until the parent is not empty.

static copy(string $source, string $target): bool

Copy a file from one location to anthoer, if target folder is not exists, the folder will be created.

static mkdir(string $path): bool

Create directory recursively if it's not exists. This action will set folder permission to 0777.

static rmdir(string $path): bool

Remove dir with all of it's files.

static scan(string $path): array

Scan directory and return list of files in the directory.

static write(string $path, string $text, string $mode = 'w'): bool

Write some text to a file. The mode parameter accept a for appending the text or w to overwrite the file.

License

The phpfit/file library is licensed under the MIT license. See License File for more information.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-08-14