graze/data-file

File manipulation

2.0-beta 2016-06-07 09:35 UTC

This package is auto-updated.

Last update: 2021-12-23 22:30:05 UTC


README

687474703a2f2f6d65646961312e67697068792e636f6d2f6d656469612f5a38643143544f69346f6c61302f67697068792e676966

Latest Version on Packagist Software License Build Status Coverage Status Quality Score Total Downloads

File manipulation classes

Install

Via Composer

$ composer require graze/data-file

Interfaces

  • FileModifierInterface - Modify a single file
  • FileExpanderInterface - Expand a single file into a collection of files
  • FileContractorInterface - Contract a collection of files into a single file
  • FileTransferInterface - Transfer a file to another file system
  • FileFinderInterface - Find files based on a configuration
  • FormatInterface - Format information about a file
  • FormatterInterface - How to format a file based on a format
  • ParserInterface - Parse a stream of data
  • ReaderInterface - Read a stream
  • WriterInterface - Write a stream

Things it does

  • Finder: MetadataFinder - Will find files based on their metadata (size, created time, etc)
  • Format: CsvFormat, JsonFormat - Defines how a csv or json file is formatted
    • Formatter: CsvFormatter, JsonFormatter - Format data into csv or json file
    • Parse: CsvParser, JsonParser - Parse a file containing csv, or json data
  • Modify
    • Compression: Gzip, Zip, FindCompression - Compress, decompress and find the compression of files
    • Merge: Merge - Join multiple files into a single file
    • Transfer: Transfer - Transfer a file from any thephpleague/flysystem Filesystem to another filesystem
    • Encoding: ConvertEncoding, FindEncoding - Change or find the encoding of a file
    • Line manipulation: Head,Tail - Retrieve a segment of a file
    • Replace Text: ReplaceText - Replace all instances of a string with another string
    • ReFormat: ReFormat - Read a file in 1 format and convert to another
  • IO
    • Read: FileReader,StreamReader - Read a file/stream in a specified format
    • Write: FileWriter,StreamWriter - Write a file/stream in a specified format

Testing

$ make test

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email security@graze.com instead of using the issue tracker.

Credits

License

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