定制 dnj/tmp-filesystem 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

dnj/tmp-filesystem

最新稳定版本:1.1.0

Composer 安装命令:

composer require dnj/tmp-filesystem

包简介

Simple local interface to work with temporary files and directories

README 文档

README

Latest Version on Packagist Total Downloads Software License Testing status

Introduction

This is a simple implemenetation of DNJ\FileSystem for working with temporary disk based file system.

How To Use

First of all, you need to add this library to your project, so run:

composer require dnj/tmp-filesystem

Working with this filesystem is same as working with DNJ\local-filesystem
But you don't need to specify $path in the constructor of the Nodes. Because the file or directory is created in the temporary path of the operationg system.

For more information to how deal with this filesystem, you can read DNJ\local-filesystem README.md

Also, you don't need to delete temporary file and directories manually, because they have been automatically deleted when there is no pointer to them. (technically, when the __destruct method of object called.)

Create temporary file:

<?php
use dnj\Filesystem\Tmp\File;

$tmpFile = new File();
echo $tmppFile->getPath(); // prints the path of temporary file, in linux, it's may something like this: /tmp/qyiuqgi

Create temporary directory:

<?php
use dnj\Filesystem\Tmp\Directory;

$tmpDirectory = new Directory();
echo $tmpDirectory->getPath(); // prints the path of temporary directory, in linux, it's may something like this: /tmp/qyiuqgi

About

We'll try to maintain this project as simple as possible, but Pull Requests are welcomed!

License

The MIT License (MIT). Please see License File for more information.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-09-26