2017 © Pedro Peláez
 

library into-one

merge files into one

image

skt-t1-byungi/into-one

merge files into one

  • Friday, March 17, 2017
  • by skt-t1-byungi
  • Repository
  • 1 Watchers
  • 0 Stars
  • 4 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

SktT1Byungi/IntoOne

merge files into one, (*1)

Latest Stable Version Total Downloads License, (*2)

Description

여러 파일을 merge해서 관리하기 위한 용도., (*3)

Usage

namespace SktT1Byungi\IntoOne;

$path = "test.bin";

var_dump(is_file($path)); //false;

IntoOne::concat($path, function ($add) {
    $add->data('key1', 'abcd');
    $add->path('key2', 'files/test.txt');
    $add->resource('key3', fopen('php://stdin', 'r'));
});

var_dump(is_file($path)); //true;

$data = IntoOne::read($path, 'key1'); // $data == 'abcd'

//for large file
$content = '';
IntoOne::readChunks($path, "key2", function ($chunk) use ($content) {
    $content .= $chunk;
});

//$content == file_get_contents("files/test.txt")

without facade

namespace SktT1Byungi\IntoOne;

$path = "test.bin";

$resource = Resource::fopen($path, 'w');
$concat = new Concat($resource);
$add = new Add($concat);

$add->data('key1', 'abcd');
$add->path('key2', 'files/test.txt');
$add->resource('key3', fopen('php://stdin', 'r'));

$concat->finish();

License

MIT, (*4)

The Versions

17/03 2017

dev-master

9999999-dev

merge files into one

  Sources   Download

MIT

The Development Requires

by Avatar skt-t1-byungi

21/11 2016

1.0.2

1.0.2.0

merge files into one

  Sources   Download

MIT

The Development Requires

by Avatar skt-t1-byungi

21/11 2016

1.0.1

1.0.1.0

merge files into one

  Sources   Download

MIT

The Development Requires

by Avatar skt-t1-byungi

20/11 2016

1.0.0

1.0.0.0

merge files into one

  Sources   Download

MIT

The Development Requires

by Avatar skt-t1-byungi